fix php parse error

This commit is contained in:
Gnieark 2015-12-17 18:56:40 +01:00
parent 7bfa057499
commit 55b4e7bb85
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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