From e1cfeb1e1b8aa901e0a4c69e512e01e808c3d217 Mon Sep 17 00:00:00 2001 From: Gnieark Date: Fri, 18 Dec 2015 20:38:03 +0100 Subject: [PATCH] stupidIA just rand --- html/StupidIABattleship.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/html/StupidIABattleship.php b/html/StupidIABattleship.php index 47b507c..bd204f5 100644 --- a/html/StupidIABattleship.php +++ b/html/StupidIABattleship.php @@ -207,7 +207,12 @@ switch($_POST['act']){ echo json_encode($shipsCoords); break; case "fight": - print_r($_POST); + if((is_int($_POST['width'])) && (is_int($_POST['height']))){ + echo rand(0,$_POST['width']).",".$_POST['height']; + die; + } + + die; break; default: