From 49d338e5642128e71b6e5a64b836ad778de47aaa Mon Sep 17 00:00:00 2001 From: Gnieark Date: Mon, 13 Jun 2016 13:53:28 +0200 Subject: [PATCH] . --- connectfour.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/connectfour.php b/connectfour.php index 1606661..9195df7 100644 --- a/connectfour.php +++ b/connectfour.php @@ -127,13 +127,14 @@ function better_col($board,$me){ } $in=preg_replace('/""/','" "',file_get_contents('php://input')); -echo $in; + $params=json_decode($in, TRUE); switch($params['action']){ case "init": echo '{"name":"Gnieark"}'; break; case "play-turn": + echo $in; echo '{"play":"'.better_col($params['board'],$params['you']).'"}'; break; default: