diff --git a/connectfourLearn.php b/connectfourLearn.php index 643429e..b5a56f4 100644 --- a/connectfourLearn.php +++ b/connectfourLearn.php @@ -73,7 +73,9 @@ function play($map,$colToPlay,$me,$opponent,$gameid,$player_index){ map='".hash_map($map,$me,$opponent)."', play_at='".$colToPlay."';"); - echo '{"play":'.$colToPlay.',"comment":"'.$trace.'"}'; + //echo '{"play":'.$colToPlay.',"comment":"'.$trace.'"}'; + echo '{"play":'.$colToPlay.',"comment":13}'; + die; } diff --git a/stupidIATron.php b/stupidIATron.php index e5f4abb..2982b95 100644 --- a/stupidIATron.php +++ b/stupidIATron.php @@ -27,7 +27,9 @@ switch($params['action']){ } //get my head coords $myCoords = end($params['board'][$params['player-index']]); - list($x,$y) = explode(",",$myCoords); + + $x = $myCoords[0]; + $y = $myCoords[1]; $availablesDirs = array(); if (in_array(($x + 1).",".$y, $busyCells)){ @@ -47,7 +49,7 @@ switch($params['action']){ echo '{"play":"x+","comment":"I Loose"}'; }else{ shuffle($availablesDirs); - echo '{"play":"'.$availablesDirs[0].'","comment":"I Loose"}'; + echo '{"play":"'.$availablesDirs[0].'"}'; } break;