0) { $_SESSION['instances'] = $_POST['instances']; } } ?> Tic Tac Toe - Multiple Instances

Let's Play Tic Tac Toe!

How many games would you like to instantiate?

"; for ($i = 1; $i <= $_SESSION['instances']; $i++) { //if they haven't started a game yet let's load one if (!isset($_SESSION['game'][$i]['tictactoe'])) { $_SESSION['game'][$i]['tictactoe'] = new tictactoe($i); } echo ""; //play the game passing it the game data for that instance $_SESSION['game'][$i]['tictactoe']->playGame($_POST); echo " $i "; echo ""; } echo " "; } ?>