diff --git a/src/arenas/Battleship/act.php b/src/arenas/Battleship/act.php index 2b9a293..03f5684 100644 --- a/src/arenas/Battleship/act.php +++ b/src/arenas/Battleship/act.php @@ -81,8 +81,8 @@ switch ($_POST['act']){ 'ship6' => $postValues['nbShip6'] ); - - if(!$boatsPlayer1 = json_decode(get_IA_Response($bot1['url'],$bot1ParamsToSend))){ + $anwserPlayer1=get_IA_Response($bot1['url'],$bot1ParamsToSend); + if(!$boatsPlayer1 = json_decode($anwserPlayer1)){ echo $bot1['name']." a fait une réponse non conforme, il perd."; save_battle('Battleship',$bot1['name'],$bot2['name'],2); }