Tic Tac Toe game It's a game for two people
[1][2][3] [x][0][x] [4][5][6] ----> [0][x][0] [7][8][9] [x][0][x] -
The first player chooses to be x or 0 , The second player is affected by the choice of the first player .
-
The first player selecting a number between 1-8 to marks the board by x or 0 .
-
Now it's the turn of the second player .
-
The game continues until one of the players wins Or there will be a draw between the players .
-
The game asked if players would want to play another game , if "yes" Go back to step 1 , Other go to step 6 .
-
The program prints out that the game is over
Players can win if they get one of the following sequences
We selected -X for example
[x][ ][ ] [ ][x][ ] [ ][ ][x] [x][ ][ ] [ ][x][ ] [ ][ ][x] [x][ ][ ] , [ ][x][ ] , [ ][ ][x] [x][x][x] [ ][ ][ ] [ ][ ][ ] [ ][ ][ ] [x][x][x] [ ][ ][ ] [ ][ ][ ] , [ ][ ][ ] , [x][x][x] [ ][ ][x] [x][ ][ ] [ ][x][ ] [ ][x][ ] [x][ ][ ] , [ ][ ][x] If the board is full and there are no winners ,Then there is a draw between the players .
Welcome to Tic Tac Toe Game - - - - - - - | 1 | 2 | 3 | - - - - - - - | 4 | 5 | 6 | - - - - - - - | 7 | 8 | 9 | - - - - - - - Please pick a marker 'x' or 'O' : x player 1 Please make your move typing in the number you want place your item 1 - - - - - - - | x | 2 | 3 | - - - - - - - | 4 | 5 | 6 | - - - - - - - | 7 | 8 | 9 | - - - - - - - player 2 Please make your move typing in the number you want place your item 5 - - - - - - - | x | 2 | 3 | - - - - - - - | 4 | 0 | 6 | - - - - - - - | 7 | 8 | 9 | - - - - - - - player 1 Please make your move typing in the number you want place your item 2 - - - - - - - | x | x | 3 | - - - - - - - | 4 | 0 | 6 | - - - - - - - | 7 | 8 | 9 | - - - - - - - player 2 Please make your move typing in the number you want place your item 8 - - - - - - - | x | x | 3 | - - - - - - - | 4 | 0 | 6 | - - - - - - - | 7 | 0 | 9 | - - - - - - - player 1 Please make your move typing in the number you want place your item 3 - - - - - - - | x | x | x | - - - - - - - | 4 | 0 | 6 | - - - - - - - | 7 | 0 | 9 | - - - - - - - --------------- player 1 is win --------------- You want to start a new game 'yes'/'no no - Game Over - -------------