.
This commit is contained in:
parent
933903497a
commit
98b29495b8
|
@ -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.";
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user