This commit is contained in:
Gnieark 2016-06-20 20:30:34 +02:00
parent 933903497a
commit 98b29495b8
2 changed files with 4 additions and 8 deletions

View File

@ -135,10 +135,6 @@ switch ($_POST['act']){
$fullLogs="";
}
if(!isset($anwserPlayerJson['responseArr']['boats'])){
echo $fullLogs.$currentBot['name']." a fait une réponse non conforme, il perd 1.";

View File

@ -34,11 +34,11 @@ function fight(xd_check,fullLogs,gameId){
document.getElementById( 'bot' + strike['opponent'] + '-' + coords[1] + '-' + coords[0]).innerHTML = "X";
}
var p=createElem("p");
p.innerHTML=strike['log'];
p.innerHTML=strike['logs'];
document.getElementById('logs').appendChild(p);
document.getElementById("logs").scrollTop=document.getElementById("logs").scrollHeight;
if( strike['continue'] == 1){
fight(xd_check);
fight(xd_check,fullLogs,gameId);
}
}
@ -133,8 +133,8 @@ function battleship(bot1,bot2,gridWidth,gridHeight,nbShip1,nbShip2,nbShip3,nbShi
}
for (var i = 0; i < grids['logs'].lenght; i++) {
//alert (grids['logs'][i]);
var p=createElem("p");
p.innerHTML=grids['logs'][i];
var p = createElem("p");
p.innerHTML = grids['logs'][i];
document.getElementById('logs').appendChild(p);
}
fight(xd_check,fullLogs);