stupid tron init message response
This commit is contained in:
parent
eef6a2f471
commit
67388721e6
BIN
.connectfourLearn.php.kate-swp
Normal file
BIN
.connectfourLearn.php.kate-swp
Normal file
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…
Reference in New Issue
Block a user