From ea9a3c81180133a634105a4f31362dc7ab910641 Mon Sep 17 00:00:00 2001 From: gnieark Date: Fri, 3 Jun 2016 12:10:03 +0200 Subject: [PATCH] fix --- html/testBotScripts/tictactoe.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/html/testBotScripts/tictactoe.html b/html/testBotScripts/tictactoe.html index ff06d1b..0498187 100644 --- a/html/testBotScripts/tictactoe.html +++ b/html/testBotScripts/tictactoe.html @@ -140,19 +140,19 @@ function play(player){ xhr.onreadystatechange = function(){if(xhr.readyState == 4){ if(xhr.status == 200) { addLog('message send to bot ' + player + ':' + stringToSend); - addLog('his awnser is: ' + xhr.responseTEXT); + addLog('his awnser is: ' + xhr.responseText); try{ - var reponse = JSON.parse(xhr.responseTEXT); + var reponse = JSON.parse(xhr.responseText); var cellTarget= reponse['play']; }catch(e){ - addLog('player ' + player + ' a fait une réponse non conforme aux specs: ' + xhr.responseTEXT); + addLog('player ' + player + ' a fait une réponse non conforme aux specs: ' + xhr.responseText); return; } //test format of response var reg = '/^[0-2]\-[0-2]$/'; if (!reg.test(cellTarget)){ - addLog('player ' + player + ' a fait une réponse non conforme: ' + xhr.responseTEXT); + addLog('player ' + player + ' a fait une réponse non conforme: ' + xhr.responseText); return; } playingAT(cellTarget);