From 7cdb449608f5f396f191045d431da5a701854321 Mon Sep 17 00:00:00 2001 From: Gnieark Date: Mon, 20 Jun 2016 00:14:35 +0200 Subject: [PATCH] . --- StupidIABattleship.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/StupidIABattleship.php b/StupidIABattleship.php index 402a203..15b44e8 100644 --- a/StupidIABattleship.php +++ b/StupidIABattleship.php @@ -209,10 +209,10 @@ switch($message['action']){ echo json_encode(array("name" => "gnieark", "boats" => $shipsCoords)); break; - case "fight": + case "play-turn": //for debog arena - echo '{"play":"'.rand(0,$_POST['width'] -1)."-".rand(0,$_POST['height'] -1).'"}'; + echo '{"play":"'.rand(0,$message['board']['width'] -1).",".rand(0,$message['board']['height'] -1).'"}'; die;