diff --git a/html/testBotScripts/connectfour.html b/html/testBotScripts/connectfour.html index 638e4dc..4b13fb8 100644 --- a/html/testBotScripts/connectfour.html +++ b/html/testBotScripts/connectfour.html @@ -222,7 +222,7 @@ function play(player){ var arrToSend= { "game-id": "" + gameId, "action" : "play-turn", - "game" : "connectFour", + "game" : "connectfour", "players" : 2, "board" : board, "you" : symbol, @@ -301,9 +301,9 @@ function startGame(){ var xhr = new XMLHttpRequest(); xhr.open("POST", document.getElementById('url' + p).value, false); xhr.setRequestHeader("Content-Type", "application/json"); - xhr.send(' {"game-id":"' + gameId + '","action":"init","game":"connectFour","players":2,"board":"","player-index":' + (p - 1) +'}'); + xhr.send(' {"game-id":"' + gameId + '","action":"init","game":"connectfour","players":2,"board":"","player-index":' + (p - 1) +'}'); if(xhr.status == 200) { - addLog('Message d\'init envoyé au bot player ' + p + ' {"game-id":"' + gameId + '","action":"init","game":"connectFour","players":2,"board":"","player-index":' + (p - 1) +'}
il a répondu ' + xhr.responseText ); + addLog('Message d\'init envoyé au bot player ' + p + ' {"game-id":"' + gameId + '","action":"init","game":"connectfour","players":2,"board":"","player-index":' + (p - 1) +'}
il a répondu ' + xhr.responseText ); }else{ addLog('player ' + p + ' n est pas joignable ' + xhr.status); return; diff --git a/src/arenas/connectFour/act.php b/src/arenas/connectFour/act.php index 61edf4e..9d1fabb 100644 --- a/src/arenas/connectFour/act.php +++ b/src/arenas/connectFour/act.php @@ -54,7 +54,7 @@ switch ($_POST['act']){ $params[$player]=array( 'game-id' => $_SESSION['matchId'], 'action' => 'init', - 'game' => 'connectFou', + 'game' => 'connectfour', 'players' => 2, 'board' => '', 'player-index' => $player @@ -106,9 +106,9 @@ switch ($_POST['act']){ */ //make post datas to send $postDatas=array( - 'game-id' => $_SESSION['matchId'], + 'game-id' => "".$_SESSION['matchId'], 'action' => 'play-turn', - 'game' => 'connectFour', + 'game' => 'connectfour', 'players' => 2, 'opponent' => $opponentName, 'you' => $you, diff --git a/src/arenas/connectFour/doc-en.html b/src/arenas/connectFour/doc-en.html index e5cc429..4d549c9 100644 --- a/src/arenas/connectFour/doc-en.html +++ b/src/arenas/connectFour/doc-en.html @@ -10,12 +10,12 @@

Your bot responds with a JSON array.

Message initating the game

BotsArena sends: -
{"game-id":"1126","action":"init","game":"connectFour","players":2,"board":"","player-index":0}
+
{"game-id":"1126","action":"init","game":"connectfour","players":2,"board":"","player-index":0}

Explanation of each parameters: