i am on the train

This commit is contained in:
Gnieark 2016-07-01 07:19:00 +02:00
parent 60d77845cd
commit 46bc3334bb

View File

@ -38,14 +38,27 @@ switch ($_POST['act']){
}
}
$players = $botCount;
if ($botCount < 2){
error (500,"missing bots");
}
//send init message
$gameId = get_unique_id();
$responses = array();
for ($botCount = 0; $botCount < count($bot); $botCount ++){
$messageArr = array(
'game-id' => "".$gameId,
'action' => 'init',
'game' => 'tron'
'board' => '',
'players' => $players,
'player-index' => $botCount
);
$responses[] = get_IA_Response($bots[$botCount]->url,$messageArr); //don't care about result
}
print_r($responses);
break;
default:
break;