From d46636a74c145c9fd1ccdb798bf3954180def1dd Mon Sep 17 00:00:00 2001 From: Gnieark Date: Mon, 14 Dec 2015 19:53:24 +0100 Subject: [PATCH] act.php --- src/arenas/Battleship/act.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/arenas/Battleship/act.php b/src/arenas/Battleship/act.php index cb7178b..2b9a293 100644 --- a/src/arenas/Battleship/act.php +++ b/src/arenas/Battleship/act.php @@ -82,7 +82,10 @@ switch ($_POST['act']){ ); - $anwserPlayer1 = get_IA_Response($bot1['url'],$bot1ParamsToSend); + if(!$boatsPlayer1 = json_decode(get_IA_Response($bot1['url'],$bot1ParamsToSend))){ + echo $bot1['name']." a fait une réponse non conforme, il perd."; + save_battle('Battleship',$bot1['name'],$bot2['name'],2); + } echo $anwserPlayer1; die; break;