added var to control if predict should be used

this will be controllable by user in future
This commit is contained in:
AUnicornWithNoLife 2021-07-10 12:02:33 +01:00
parent 43cbeb78ca
commit 844bd0b2cd
2 changed files with 9 additions and 3 deletions

View File

@ -48,9 +48,12 @@ function move(id)
resetPredict(); resetPredict();
var pre = calculate(ptm); if (dopredict)
{
var pre = calculate(ptm);
board[pre[0]][pre[1]][1].parentElement.classList.add('predict'); board[pre[0]][pre[1]][1].parentElement.classList.add('predict');
}
} }
function win() function win()

View File

@ -6,7 +6,8 @@ var ptm;
var tabloid; var tabloid;
var gamemode; var gamemode;
var root; var root;
var themesel var themesel;
var dopredict;
function load() function load()
{ {
@ -65,6 +66,8 @@ function load()
themesel = document.getElementById('theme-sel'); themesel = document.getElementById('theme-sel');
root = document.documentElement; root = document.documentElement;
dopredict = true;
info['go'].innerHTML = "X's Go"; info['go'].innerHTML = "X's Go";