.
This commit is contained in:
parent
98b29495b8
commit
642ae29284
|
@ -298,7 +298,7 @@ switch ($_POST['act']){
|
||||||
OR (!preg_match('/^[0-9]+,[0-9]+$/',$anwserPlayerJson['play']))){
|
OR (!preg_match('/^[0-9]+,[0-9]+$/',$anwserPlayerJson['play']))){
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'target' => '',
|
'target' => '',
|
||||||
'log' => $fullLogs.$currentBot['name']." a fait une réponse non conforme, il perd."));
|
'logs' => $fullLogs.$currentBot['name']." a fait une réponse non conforme, il perd."));
|
||||||
save_battle('Battleship',$_SESSION['bot1']['name'],$_SESSION['bot2']['name'],$opponent);
|
save_battle('Battleship',$_SESSION['bot1']['name'],$_SESSION['bot2']['name'],$opponent);
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
@ -308,7 +308,7 @@ switch ($_POST['act']){
|
||||||
if(($x >= $_SESSION['width']) OR ($y >= $_SESSION['height'])){
|
if(($x >= $_SESSION['width']) OR ($y >= $_SESSION['height'])){
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'target' => '',
|
'target' => '',
|
||||||
'log' => $fullLogs.$currentBot['name']." a fait un tir en dehors des limites de la carte. ".$x.",".$y." C'est interdit par les conventions de Geneve. Il perd"
|
'logs' => $fullLogs.$currentBot['name']." a fait un tir en dehors des limites de la carte. ".$x.",".$y." C'est interdit par les conventions de Geneve. Il perd"
|
||||||
));
|
));
|
||||||
save_battle('Battleship',$_SESSION['bot1']['name'],$_SESSION['bot2']['name'],$opponent);
|
save_battle('Battleship',$_SESSION['bot1']['name'],$_SESSION['bot2']['name'],$opponent);
|
||||||
die;
|
die;
|
||||||
|
@ -365,7 +365,7 @@ switch ($_POST['act']){
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'opponent'=> $opponent,
|
'opponent'=> $opponent,
|
||||||
'target' => $x.",".$y,
|
'target' => $x.",".$y,
|
||||||
'log' => $fullLogs.$currentBot['name']." tire en ".$x.",".$y." ".$result,
|
'logs' => $fullLogs.$currentBot['name']." tire en ".$x.",".$y." ".$result,
|
||||||
'continue' => $continue
|
'continue' => $continue
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user