.
This commit is contained in:
parent
47267c634f
commit
49d338e564
|
@ -127,13 +127,14 @@ function better_col($board,$me){
|
||||||
}
|
}
|
||||||
|
|
||||||
$in=preg_replace('/""/','" "',file_get_contents('php://input'));
|
$in=preg_replace('/""/','" "',file_get_contents('php://input'));
|
||||||
echo $in;
|
|
||||||
$params=json_decode($in, TRUE);
|
$params=json_decode($in, TRUE);
|
||||||
switch($params['action']){
|
switch($params['action']){
|
||||||
case "init":
|
case "init":
|
||||||
echo '{"name":"Gnieark"}';
|
echo '{"name":"Gnieark"}';
|
||||||
break;
|
break;
|
||||||
case "play-turn":
|
case "play-turn":
|
||||||
|
echo $in;
|
||||||
echo '{"play":"'.better_col($params['board'],$params['you']).'"}';
|
echo '{"play":"'.better_col($params['board'],$params['you']).'"}';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user