From 945214198d785bc6b8c1ab14a68face93e42f0ab Mon Sep 17 00:00:00 2001 From: gnieark Date: Sun, 19 Jun 2016 23:11:18 +0200 Subject: [PATCH] license --- 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 b26d216..049e900 100644 --- a/src/arenas/Battleship/act.php +++ b/src/arenas/Battleship/act.php @@ -287,14 +287,14 @@ switch ($_POST['act']){ } - if(!preg_match('/^[0-9]+,[0-9]+$/',$anwserPlayer['responseArr']['play'])){ + if(!preg_match('/^[0-9]+,[0-9]+$/',$anwserPlayerJson['responseArr']['play'])){ echo json_encode(array( 'target' => '', 'log' => $fullLogs.$currentBot['name']." a fait une réponse non conforme, il perd.")); save_battle('Battleship',$_SESSION['bot1']['name'],$_SESSION['bot2']['name'],$opponent); die; } - list($x,$y)=explode(",",$anwserPlayer); + list($x,$y)=explode(",",$anwserPlayerJson['responseArr']['play']); //check if shot is under map's limits if(($x >= $_SESSION['width']) OR ($y >= $_SESSION['height'])){