stupid tron init message response

This commit is contained in:
Gnieark 2016-07-01 07:32:39 +02:00
parent eef6a2f471
commit 67388721e6
2 changed files with 21 additions and 0 deletions

Binary file not shown.

View File

@ -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;
}