From 88d2106aa05f198846a7c59ed5d07b0936a431bd Mon Sep 17 00:00:00 2001 From: Gnieark Date: Sat, 19 Dec 2015 13:47:02 +0100 Subject: [PATCH] fix --- src/arenas/Battleship/act.php | 1 + 1 file changed, 1 insertion(+) 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){