From 79da420534550b36911c81a3285de3444b7030db Mon Sep 17 00:00:00 2001 From: Gnieark Date: Thu, 24 Dec 2015 16:32:50 +0100 Subject: [PATCH] animation --- html/StupidIABattleship.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/html/StupidIABattleship.php b/html/StupidIABattleship.php index ca8afb6..8acce85 100644 --- a/html/StupidIABattleship.php +++ b/html/StupidIABattleship.php @@ -202,21 +202,15 @@ switch($_POST['act']){ } } } - - //print_r($map); + echo json_encode($shipsCoords); file_put_contents(__DIR__."/log.txt",json_encode($shipsCoords),FILE_APPEND); break; case "fight": //for debog arena file_put_contents(__DIR__."/log.txt",print_r($_POST,true),FILE_APPEND); - - -// if((is_int(settype($_POST['width'],"integer"))) && (is_int(settype($_POST['height'],"integer")))){ + echo rand(0,$_POST['width'] -1).",".rand(0,$_POST['height'] -1); -// }else{ -// echo "boaf".$_POST['width']."-".$_POST['height']; -// } die;