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: 1

Player, please select a mark for the computer (X or O): X

The computer will use X as a Mark

Game just started ....

The computer starts first ...

 

Computer selects box number: 6

 

 | |

- - -

 | |X

- - -

 | |

 

Player, please select a box: 5

 

 | |

- - -

 |O|X

- - -

 | |

 

Computer selects box number: 4

 

 | |

- - -

X|O|X

- - -

 | |

 

Player, please select a box: 1

 

O| |

- - -

X|O|X

- - -

 | |

 

Computer selects box number: 9

 

O| |

- - -

X|O|X

- - -

 | |X

 

Player, please select a box: 3

 

O| |O

- - -

X|O|X

- - -

 | |X

 

Computer selects box number: 7

 

O| |O

- - -

X|O|X

- - -

X| |X

 

Player, please select a box: 2

 

O|O|O

- - -

X|O|X

- - -

X| |X

 

Game is over! You win. Congratulations!!