diff --git a/html/StupidIAconnectFour.php b/html/StupidIAconnectFour.php new file mode 100644 index 0000000..f96fdd6 --- /dev/null +++ b/html/StupidIAconnectFour.php @@ -0,0 +1,3 @@ + "connectFou"){ + erreur(500,"game non found"); + } + + //What player has to play? + if(!isset($_SESSION['currentPlayer']){ + $_SESSION['currentPlayer']=1; + $you="X"; + }else{ + if($_SESSION['currentPlayer']==1){ + $_SESSION['currentPlayer']=2; + $you="O"; + }else{ + $_SESSION['currentPlayer']=1; + $you="X"; + } + } + + //make post datas to send + $postDatas=array( + 'game' => 'conectFour', + 'match_id' => $_SESSION['matchId']. $_SESSION['currentPlayer'], + //'opponent' => $opponentName, + 'you' => $you + 'grid' => json_encode( $_SESSION['map']) + + ); + //debug + print_r($postDatas); + print_r($_SESSION['bot1']); + + + die; break; default: diff --git a/src/arenas/connectFour/public.php b/src/arenas/connectFour/public.php index aa5ed1b..852c0e9 100644 --- a/src/arenas/connectFour/public.php +++ b/src/arenas/connectFour/public.php @@ -1,7 +1,7 @@