try to draw 1000*1000 svg grig

This commit is contained in:
Gnieark 2016-06-29 16:56:24 +02:00
parent 0252c5b899
commit 9c2f3eb26a

View File

@ -11,9 +11,35 @@
# -- END LICENSE BLOCK ----------------------------------------- # -- END LICENSE BLOCK -----------------------------------------
require_once(__DIR__."/functions.php"); require_once(__DIR__."/functions.php");
switch ($_POST['act']){ switch ($_POST['act']){
case "initGame": case "initGame":
//check if bots exists
$bots=get_Bots_Array('tron');
$bot1Exists = false;
$bot2Exists = false;
foreach($bots as $bot){
if($bot['id'] == $_POST['bot1']){
$_SESSION['bots'][]=new TronPlayer($bot['id']);
$bot1Exists =true;
}
if($bot['id'] == $_POST['bot2']){
$_SESSION['bots'][]=new TronPlayer($bot['id']);
$bot2Exists =true;
}
if ($bot1Exists && $bot2Exists){
break;
}
}
if ((!$bot1Exists) OR (!$bot2Exists)){
error (500,"missing parameter 2");
}
echo "plop";
break; break;
default: default: