This commit is contained in:
gnieark 2016-06-03 15:55:55 +02:00
parent 63e800bd1c
commit cf60dd752d

View File

@ -90,8 +90,7 @@ function playingAT(cellKey){
var symbol="O"; var symbol="O";
} }
grid[cellKey]=symbol; grid[cellKey]=symbol;
alert (cellKey); document.getElementById(cellKey).innerHTML = symbol;
document.getElementById[cellKey].innerHTML = symbol;
addLog("Player " + currentPlayer + " joue " + cellKey); addLog("Player " + currentPlayer + " joue " + cellKey);
//does he win? //does he win?
@ -107,6 +106,7 @@ function playingAT(cellKey){
|| ((grid['0-2'] == grid['1-1']) && (grid['1-1'] == grid['2-0']) && (grid['2-0']!=="")) || ((grid['0-2'] == grid['1-1']) && (grid['1-1'] == grid['2-0']) && (grid['2-0']!==""))
){ ){
addLog("Player " + currentPlayer + "gagne la partie"); addLog("Player " + currentPlayer + "gagne la partie");
return;
} }
//change player //change player