connect four full js
This commit is contained in:
parent
b1ecd1bc3e
commit
01b07a582d
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
$in=file_get_contents('php://input');
|
$in=file_get_contents('php://input');
|
||||||
$params=json_decode($in, TRUE);
|
$params=json_decode($in, TRUE);
|
||||||
$grid=$params['grid'];
|
$grid=$params['board'];
|
||||||
$colAvailable=array();
|
$colAvailable=array();
|
||||||
|
|
||||||
for($i=0;$i<7;$i++){
|
for($i=0;$i<7;$i++){
|
||||||
|
@ -14,5 +14,5 @@ for($i=0;$i<7;$i++){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
shuffle($colAvailable);
|
shuffle($colAvailable);
|
||||||
echo $colAvailable[0];
|
echo "{'play':'".$colAvailable[0]."'}";
|
||||||
die;
|
die;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user