From bf676dc9f344a463d33bc5eeee0452b10f814fc9 Mon Sep 17 00:00:00 2001 From: gnieark Date: Sun, 19 Jun 2016 23:43:42 +0200 Subject: [PATCH] . --- src/arenas/connectFour/js.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/arenas/connectFour/js.js b/src/arenas/connectFour/js.js index 2802f6a..d8fc9dc 100644 --- a/src/arenas/connectFour/js.js +++ b/src/arenas/connectFour/js.js @@ -68,7 +68,9 @@ function connectFour(bot1,bot2,xd_check, gameId, newGame){ } //log addLog(reponse['log']); - + if(newGame){ + gameId = reponse['gameId']; + } //fill the grid if( reponse['strikeX'] > -1){ document.getElementById('td' + reponse['strikeX'] + '_' + reponse['strikeY']).innerHTML = reponse['strikeSymbol']; @@ -87,7 +89,7 @@ function connectFour(bot1,bot2,xd_check, gameId, newGame){ //if game isn't finished, continue if(reponse['continue'] == 1){ - connectFour(bot1,bot2,xd_check,reponse['gameId'], false); + connectFour(bot1,bot2,xd_check,gameId, false); }else{ document.getElementById('fightButton').disabled=false; }