debog communication
This commit is contained in:
parent
68caf7b55f
commit
18a3787545
2
html/StupidIABattleship.php
Normal file
2
html/StupidIABattleship.php
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<?php
|
||||||
|
print_r($_POST);
|
|
@ -83,7 +83,7 @@ switch ($_POST['act']){
|
||||||
);
|
);
|
||||||
|
|
||||||
$anwserPlayer1 = get_IA_Response($bot1['url'],$bot1ParamsToSend);
|
$anwserPlayer1 = get_IA_Response($bot1['url'],$bot1ParamsToSend);
|
||||||
|
echo $anwserPlayer1; die;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -61,7 +61,8 @@ function battleship(bot1,bot2,gridWidth,gridHeight,nbShip1,nbShip2,nbShip3,nbShi
|
||||||
var xhr = Ajx();
|
var xhr = Ajx();
|
||||||
xhr.onreadystatechange = function(){if(xhr.readyState == 4){
|
xhr.onreadystatechange = function(){if(xhr.readyState == 4){
|
||||||
if(xhr.status == 200) {
|
if(xhr.status == 200) {
|
||||||
//document.getElementById('fightResult').innerHTML = xhr.responseText;
|
//debug
|
||||||
|
document.getElementById('logs').innerHTML = xhr.responseText;
|
||||||
}
|
}
|
||||||
}};
|
}};
|
||||||
xhr.open("POST", '/Battleship', true);
|
xhr.open("POST", '/Battleship', true);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user