Welcome to the Tic Tac Toe Game!

You could choose to play against the computer or against another player.

When selecting a box, players must enter a number from 1 to 9. Each number

corresponds to box as shown below.

 

1|2|3

- - -

4|5|6

- - -

7|8|9

 

Enter number of players: 1 or 2 only

      1: means playing against computer

      2: means playing against another player

The number of player is: 2

Player 1, please select a Mark (X or O): X

Player 2 will use O as a Mark

Game just started ....

Player 1 starts first ...

 

Player 1, please select a box: 1

 

X| |

- - -

 | |

- - -

 | |

 

Player 2, please select a box: 3

 

X| |O

- - -

 | |

- - -

 | |

 

Player 1, please select a box: 5

 

X| |O

- - -

 |X|

- - -

 | |

 

Player 2, please select a box: 9

 

X| |O

- - -

 |X|

- - -

 | |O

 

Player 1, please select a box: 6

 

X| |O

- - -

 |X|X

- - -

 | |O

 

Player 2, please select a box: 4

 

X| |O

- - -

O|X|X

- - -

 | |O

 

Player 1, please select a box: 8

 

X| |O

- - -

O|X|X

- - -

 |X|O

 

Player 2, please select a box: 2

 

X|O|O

- - -

O|X|X

- - -

 |X|O

 

Player 1, please select a box: 7

 

X|O|O

- - -

O|X|X

- - -

X|X|O

 

Game Over!  No one wins!