Tic Tac Toe
Overview¶
You will use a two-dimensional array - specifically, a 3 by 3 array - to represent a Tic Tac Toe board, and implement the basic functionality of the game.
Have two players, alternating turns, insert their symbol (X or O) into a specific location on the 3 x 3 grid. If a player gets 3 in a row they win.
User Story #1¶
The first player is prompted to decide between X or O as their mark. From here we can alternate symbols by turn.
User Story #2¶
The first player is then prompted to instruct the game where they would like to put their mark on the 3 x 3 grid.
User Story #3¶
The players should be shown the board after each move, with the current marks of both players.
User Story #4¶
The second player should now be prompted to insert a mark onto the grid, subsequently showing the board with the current marks of both players.
Repeat this process alternating players.
User Story #5¶
A player is not allowed to place a mark on a square that is already taken.
User Story #6¶
The game is over when either: * A player places three of their marks in a horizontal, vertical, or diagonal row. * No more squares are available.
The game displays whether player 1 won, player 2 won, or the game was a draw.
User Story #7 (Stretch Goal)¶
When a game is over, the players are prompted if they would like to play again.