diff --git a/src/arenas/tron/act.php b/src/arenas/tron/act.php index 3a7e539..87fdafe 100644 --- a/src/arenas/tron/act.php +++ b/src/arenas/tron/act.php @@ -23,11 +23,11 @@ switch ($_POST['act']){ $bot2Exists = false; foreach($bots as $bot){ if($bot['id'] == $_POST['bot1']){ - $_SESSION['bots'][]=new TronPlayer($bot['id']); + $_SESSION['bots'][]=new TronPlayer($bot['id'],1,1); $bot1Exists =true; } if($bot['id'] == $_POST['bot2']){ - $_SESSION['bots'][]=new TronPlayer($bot['id']); + $_SESSION['bots'][]=new TronPlayer($bot['id'],998,998); $bot2Exists =true; } if ($bot1Exists && $bot2Exists){ diff --git a/src/arenas/tron/functions.php b/src/arenas/tron/functions.php index e0451b2..81f34e3 100644 --- a/src/arenas/tron/functions.php +++ b/src/arenas/tron/functions.php @@ -31,7 +31,7 @@ class TronPlayer{ $headCoords = end($this->tail); - switch $dir{ + switch ($dir){ case "y+": $targetCoords = array($headCoords[0],$headCoords[1]++); break;