From ad27848ef8638f87a665feabb4d80f2e87863e5c Mon Sep 17 00:00:00 2001 From: gnieark Date: Tue, 15 Dec 2015 23:45:53 +0100 Subject: [PATCH] debug --- src/arenas/Battleship/act.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arenas/Battleship/act.php b/src/arenas/Battleship/act.php index c086022..8dbcd9f 100644 --- a/src/arenas/Battleship/act.php +++ b/src/arenas/Battleship/act.php @@ -109,7 +109,7 @@ switch ($_POST['act']){ //vérifier si'il y a le bon nombre de bateaux et les placer $nbBoatsIwant=array(0,$postValues['nbShip1'],$postValues['nbShip2'],$postValues['nbShip3'], $postValues['nbShip4'],$postValues['nbShip5'],$postValues['nbShip6']); - print_r($nbBoatsIwant); + foreach($boatsPlayer as $boat){ list($startCoord,$endCoord) = explode("-",$boat); list($xStart,$yStart)=explode(",",$startCoord); @@ -122,7 +122,7 @@ switch ($_POST['act']){ $nbBoatsIwant[$long]-=1; $grid[$player]=place_ship_on_map($xStart,$yStart,$xEnd,$yEnd,$grid[$player]); if(!$grid[$player]){ - echo $currentBot['name']." n'a pas placé correctement ses bateaux. Certains se chevauchent. Il perd
".$anwserPlayer."
"; + echo $currentBot['name']." n'a pas placé correctement ses bateaux. Certains se chevauchent. Il perd
".$anwserPlayer." ".$xStart.$yStart.$xEnd.$yEnd."
"; if($player==1){ save_battle('Battleship',$bot1['name'],$bot2['name'],2); }else{