loop
This commit is contained in:
parent
bf79dad577
commit
2346bfa242
|
@ -268,10 +268,16 @@ switch ($_POST['act']){
|
|||
'target' => $x.",".$y,
|
||||
'result' => $result
|
||||
);
|
||||
if(count( $_SESSION['strikes'][$currentPlayer]) < 10){
|
||||
$continue=1;
|
||||
}else{
|
||||
$continue=0;
|
||||
}
|
||||
echo json_encode(array(
|
||||
'opponent'=> $opponent,
|
||||
'target' => $x.",".$y,
|
||||
'log' => $currentBot['name']."tire en ".$x.",".$y." ".$result
|
||||
'log' => $currentBot['name']."tire en ".$x.",".$y." ".$result,
|
||||
'continue' => $continue
|
||||
));
|
||||
|
||||
die;
|
||||
|
|
|
@ -36,7 +36,10 @@ function fight(xd_check){
|
|||
var p=createElem("p");
|
||||
p.innerHTML=strike['log'];
|
||||
document.getElementById('logs').appendChild(p);
|
||||
//fight(xd_check);
|
||||
|
||||
if( strike['continue'] == 1){
|
||||
fight(xd_check);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user