fixed issues
This commit is contained in:
parent
3bf91c8953
commit
338f7060a6
15
src/code.js
15
src/code.js
@ -48,6 +48,8 @@ function move(id)
|
||||
|
||||
var pre = calculate();
|
||||
|
||||
resetPrediction();
|
||||
|
||||
board[pre[0]][pre[1]][1].parentElement.classList.add('predict');
|
||||
}
|
||||
|
||||
@ -143,6 +145,8 @@ function reset()
|
||||
tabloid.classList.remove('win');
|
||||
tabloid.classList.remove('lol');
|
||||
|
||||
resetPrediction();
|
||||
|
||||
load();
|
||||
}
|
||||
|
||||
@ -208,3 +212,14 @@ function calculate()
|
||||
return [0, 2];
|
||||
}
|
||||
}
|
||||
|
||||
function resetPrediction()
|
||||
{
|
||||
for (var x in board)
|
||||
{
|
||||
for (var y in board[x])
|
||||
{
|
||||
board[x][y][1].parentElement.classList.remove('predict');
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user