This commit is contained in:
gnieark 2016-06-19 23:48:31 +02:00
parent bf676dc9f3
commit ebcfa6b90e

View File

@ -68,9 +68,7 @@ function connectFour(bot1,bot2,xd_check, gameId, newGame){
} }
//log //log
addLog(reponse['log']); addLog(reponse['log']);
if(newGame){
gameId = reponse['gameId'];
}
//fill the grid //fill the grid
if( reponse['strikeX'] > -1){ if( reponse['strikeX'] > -1){
document.getElementById('td' + reponse['strikeX'] + '_' + reponse['strikeY']).innerHTML = reponse['strikeSymbol']; document.getElementById('td' + reponse['strikeX'] + '_' + reponse['strikeY']).innerHTML = reponse['strikeSymbol'];
@ -89,7 +87,7 @@ function connectFour(bot1,bot2,xd_check, gameId, newGame){
//if game isn't finished, continue //if game isn't finished, continue
if(reponse['continue'] == 1){ if(reponse['continue'] == 1){
connectFour(bot1,bot2,xd_check,gameId, false); connectFour(bot1,bot2,xd_check,reponse['gameId'], false);
}else{ }else{
document.getElementById('fightButton').disabled=false; document.getElementById('fightButton').disabled=false;
} }