Tic-Tac-Toe Game Example 2

Game where computer wins

$ python3 tictactoe.py
-----------------------
Welcome to Tic-Tac-Toe!
-----------------------

Enter your choice like the numbers below:

 0 | 1 | 2
-----------
 3 | 4 | 5
-----------
 6 | 7 | 8

Computer chooses: 2

   |   | O
-----------
   |   |
-----------
   |   |

Enter 0-8 for your choice: 5

   |   | O
-----------
   |   | X
-----------
   |   |

Computer chooses: 7

   |   | O
-----------
   |   | X
-----------
   | O |

Enter 0-8 for your choice: 8

   |   | O
-----------
   |   | X
-----------
   | O | X

Computer chooses: 1

   | O | O
-----------
   |   | X
-----------
   | O | X

Enter 0-8 for your choice: 0

 X | O | O
-----------
   |   | X
-----------
   | O | X

Computer chooses: 3

 X | O | O
-----------
 O |   | X
-----------
   | O | X

Enter 0-8 for your choice: 6

 X | O | O
-----------
 O |   | X
-----------
 X | O | X

Computer chooses: 4

 X | O | O
-----------
 O | O | X
-----------
 X | O | X


Sorry, the computer beat you.