From d7c4688a5293fb2aa022b3f40dab7ebe2fc4de21 Mon Sep 17 00:00:00 2001 From: gnieark Date: Tue, 15 Dec 2015 23:15:53 +0100 Subject: [PATCH] debug php --- html/StupidIABattleship.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/StupidIABattleship.php b/html/StupidIABattleship.php index 2a51294..3000f37 100644 --- a/html/StupidIABattleship.php +++ b/html/StupidIABattleship.php @@ -85,7 +85,7 @@ switch($_POST['act']){ $top=false; }else{ $top=true; - for($i = $ytest; $i > $ytest - $shipWidth + 1; $i--){ + for($i = $ytest; $i >= $ytest - $shipWidth + 1; $i--){ if($map[$i][$xtest] == 1){ $top=false; break; @@ -124,7 +124,7 @@ switch($_POST['act']){ $left=false; }else{ $left=true; - for($i = $xtest; $i > $xtest - $shipWidth + 1; $i--){ + for($i = $xtest; $i >= $xtest - $shipWidth + 1; $i--){ if($map[$ytest][$i] == 1){ $left= false; break;