erf
This commit is contained in:
parent
1951865b0c
commit
49b6034f3d
|
@ -82,7 +82,7 @@ switch ($_POST['act']){
|
||||||
|
|
||||||
);
|
);
|
||||||
$anwserPlayer1=get_IA_Response($bot1['url'],$bot1ParamsToSend);
|
$anwserPlayer1=get_IA_Response($bot1['url'],$bot1ParamsToSend);
|
||||||
$boatsPlayer1 = json_decode($anwserPlayer1);
|
$boatsPlayer1 = json_decode( html_entity_decode($anwserPlayer1));
|
||||||
if(!$boatsPlayer1){
|
if(!$boatsPlayer1){
|
||||||
echo $bot1['name']." a fait une réponse non conforme, il perd.".$anwserPlayer1;
|
echo $bot1['name']." a fait une réponse non conforme, il perd.".$anwserPlayer1;
|
||||||
save_battle('Battleship',$bot1['name'],$bot2['name'],2);
|
save_battle('Battleship',$bot1['name'],$bot2['name'],2);
|
||||||
|
|
|
@ -62,6 +62,7 @@ function battleship(bot1,bot2,gridWidth,gridHeight,nbShip1,nbShip2,nbShip3,nbShi
|
||||||
xhr.onreadystatechange = function(){if(xhr.readyState == 4){
|
xhr.onreadystatechange = function(){if(xhr.readyState == 4){
|
||||||
if(xhr.status == 200) {
|
if(xhr.status == 200) {
|
||||||
//debug
|
//debug
|
||||||
|
alert(xhr.responseText);
|
||||||
document.getElementById('logs').innerHTML = xhr.responseText;
|
document.getElementById('logs').innerHTML = xhr.responseText;
|
||||||
}
|
}
|
||||||
}};
|
}};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user