From 55b4e7bb8572d6cf752e7905c9df61caf95152b2 Mon Sep 17 00:00:00 2001 From: Gnieark Date: Thu, 17 Dec 2015 18:56:40 +0100 Subject: [PATCH] fix php parse error --- html/StupidIABattleship.php | 2 +- src/arenas/Battleship/functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/html/StupidIABattleship.php b/html/StupidIABattleship.php index 39d2f65..bb1a55c 100644 --- a/html/StupidIABattleship.php +++ b/html/StupidIABattleship.php @@ -3,7 +3,7 @@ function is_it_possible_to_place_ships_on_grid($gridWidth,$gridHeight,$nbShipsSi //return false or true //not a perfect solution $shipsArea=$nbShipsSize1 + 2 * $nbShipsSize2 + 3 * $nbShipsSize3 + 4 * $nbShipsSize4 + 5 * $nbShipsSize5 + 6 * $nbShipsSize6; - if( $shipsArea < $gridHeight * $gridwidth / 2){ + if( $shipsArea < $gridHeight * $gridWidth / 2){ return false; } //longest ship diff --git a/src/arenas/Battleship/functions.php b/src/arenas/Battleship/functions.php index 9079a2e..f41cb26 100644 --- a/src/arenas/Battleship/functions.php +++ b/src/arenas/Battleship/functions.php @@ -3,7 +3,7 @@ function is_it_possible_to_place_ships_on_grid($gridWidth,$gridHeight,$nbShipsSi //return false or true //not a perfect solution $shipsArea=$nbShipsSize1 + 2 * $nbShipsSize2 + 3 * $nbShipsSize3 + 4 * $nbShipsSize4 + 5 * $nbShipsSize5 + 6 * $nbShipsSize6; - if( $shipsArea < $gridHeight * $gridwidth / 2){ + if( $shipsArea < $gridHeight * $gridWidth / 2){ return false; } //longest ship