From 1b5222da3996008ed683c0fd6d3e0122223ff997 Mon Sep 17 00:00:00 2001 From: Gnieark Date: Mon, 14 Dec 2015 16:52:25 +0100 Subject: [PATCH] fix ship size limit --- html/StupidIABattleship.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/StupidIABattleship.php b/html/StupidIABattleship.php index d69626d..2a1912b 100644 --- a/html/StupidIABattleship.php +++ b/html/StupidIABattleship.php @@ -68,7 +68,7 @@ switch($_POST['act']){ $shipsCoords=array(); //pour toutes les tailles de bateau - for($shipWidth = 6; $shipWidth >= 0; $shipWidth--){ + for($shipWidth = 6; $shipWidth > 0; $shipWidth--){ //nombre de bateau à placer de cette taille $dynVar='ship'.$shipWidth; $shipCount=$$dynVar; // #trollface