stupid tron init message response

master
Gnieark 8 years ago
parent eef6a2f471
commit 67388721e6

Binary file not shown.

@ -0,0 +1,21 @@
<?php
<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST');
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');
/*
* stupid IA for tron
*/
$in=file_get_contents('php://input');
$params=json_decode($in, TRUE);
switch($params['action']){
case "init":
echo '{"name":"Stupid AI"}';
break;
case "play-turn":
//to do
break;
default:
break;
}
Loading…
Cancel
Save