Lab 9 Tic Tac Toe

Due April 23

Moodle
522px-Tic_tac_toe.svg.png

Goal

To create tow player Tic Tac Toe game using a matrix and using exceptions

Example

Consider the following game play:

Python 3.6.1 (default, Dec 2015, 13:05:11)
[GCC 4.8.2] on linux
   
1|2|3
-----
4|5|6
-----
7|8|9

X enter you move (1-9): 1
X|2|3
-----
4|5|6
-----
7|8|9

O enter you move (1-9): 3
X|2|O
-----
4|5|6
-----
7|8|9

X enter you move (1-9): 2
X|X|O
-----
4|5|6
-----
7|8|9

O enter you move (1-9): 5
X|X|O
-----
4|O|6
-----
7|8|9

X enter you move (1-9): 6
X|X|O
-----
4|O|X
-----
7|8|9

O enter you move (1-9): 7
X|X|O
-----
4|O|X
-----
O|8|9
O wins!
Program catching errors
Python 3.6.1 (default, Dec 2015, 13:05:11)
[GCC 4.8.2] on linux
   
1|2|3
-----
4|5|6
-----
7|8|9

X enter you move (1-9): 0
Move must be in range 1-9!

X enter you move (1-9): 12
Move must be in range 1-9!

X enter you move (1-9): -4
Move must be in range 1-9!

X enter you move (1-9): A
Input must be between 1 and 9

X enter you move (1-9): Hello
Input must be between 1 and 9

X enter you move (1-9): 3
1|2|X
-----
4|5|6
-----
7|8|9

O enter you move (1-9): 

Program Shell Here is a start: https://repl.it/@JimSkon/TicTacToeStart

Complete this program with game play as seen above.

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng 522px-Tic_tac_toe.svg.png r1 manage 37.3 K 2018-11-15 - 13:42 JimSkon  
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2019-03-24 - JimSkon
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback