try to draw 1000*1000 svg grig

This commit is contained in:
Gnieark 2016-06-29 16:57:45 +02:00
parent 9c2f3eb26a
commit c17b6cb69e
2 changed files with 3 additions and 3 deletions

View File

@ -23,11 +23,11 @@ switch ($_POST['act']){
$bot2Exists = false; $bot2Exists = false;
foreach($bots as $bot){ foreach($bots as $bot){
if($bot['id'] == $_POST['bot1']){ if($bot['id'] == $_POST['bot1']){
$_SESSION['bots'][]=new TronPlayer($bot['id']); $_SESSION['bots'][]=new TronPlayer($bot['id'],1,1);
$bot1Exists =true; $bot1Exists =true;
} }
if($bot['id'] == $_POST['bot2']){ if($bot['id'] == $_POST['bot2']){
$_SESSION['bots'][]=new TronPlayer($bot['id']); $_SESSION['bots'][]=new TronPlayer($bot['id'],998,998);
$bot2Exists =true; $bot2Exists =true;
} }
if ($bot1Exists && $bot2Exists){ if ($bot1Exists && $bot2Exists){

View File

@ -31,7 +31,7 @@ class TronPlayer{
$headCoords = end($this->tail); $headCoords = end($this->tail);
switch $dir{ switch ($dir){
case "y+": case "y+":
$targetCoords = array($headCoords[0],$headCoords[1]++); $targetCoords = array($headCoords[0],$headCoords[1]++);
break; break;