try to draw 1000*1000 svg grig
This commit is contained in:
parent
0252c5b899
commit
9c2f3eb26a
|
@ -11,9 +11,35 @@
|
|||
# -- END LICENSE BLOCK -----------------------------------------
|
||||
|
||||
require_once(__DIR__."/functions.php");
|
||||
|
||||
|
||||
switch ($_POST['act']){
|
||||
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;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue
Block a user