diff --git a/src/arenas/Battleship/act.php b/src/arenas/Battleship/act.php index 2a75436..1a7fb03 100644 --- a/src/arenas/Battleship/act.php +++ b/src/arenas/Battleship/act.php @@ -282,6 +282,7 @@ switch ($_POST['act']){ $result="hit and sunk"; //remove the ship unset($_SESSION['ships'][$opponent][$shipIndex]); + $_SESSION['ships'][$opponent] = array_values($_SESSION['ships'][$opponent]); //var_dump($_SESSION['ships'][$opponent]); //win the game? if(count($_SESSION['ships'][$opponent]) == 0){