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

 

 |X|

- - -

 | |

- - -

 | |

 

Player, please select a box: 1

 

O|X|

- - -

 | |

- - -

 | |

 

Computer selects box number: 7

 

O|X|

- - -

 | |

- - -

X| |

 

Player, please select a box: 5

 

O|X|

- - -

 |O|

- - -

X| |

 

Computer selects box number: 9

 

O|X|

- - -

 |O|

- - -

X| |X

 

Player, please select a box: 8

 

O|X|

- - -

 |O|

- - -

X|O|X

 

Computer selects box number: 3

 

O|X|X

- - -

 |O|

- - -

X|O|X

 

Player, please select a box: 6

 

O|X|X

- - -

 |O|O

- - -

X|O|X

 

Computer selects box number: 4

 

O|X|X

- - -

X|O|O

- - -

X|O|X

 

Game over!  No one wins!