python3 tic-tac-toe.py
WELCOME TO TIC-TAC-TOE - PYTHON 3
PLAY AGAINST COMPUTER?(Y OR N) : y
PLAYING AGAINT COMPUTER: True
---INSTRUCTIONS---
USE INDEX TO PLACE PIECE
---BOARD TEMPLATE---
0|1|2
3|4|5
6|7|8
YOUR PIECE: X
COMPUTER PIECE: O
BEGIN GAME NOW
1
***USER 1 TURN***
|X|
||
||
***COMPUTER TURN***
|X|
||
|O|
4
***USER 1 TURN***
|X|
|X|
|O|
***COMPUTER TURN***
|X|
|X|
|O|O
5
***USER 1 TURN***
|X|
|X|X
|O|O
***COMPUTER TURN***
|X|
|X|X
O|O|O
6
***USER 1 TURN***
|X|
|X|X
O|O|O
***Index 6 Used***
77
***USER 1 TURN***
|X|
|X|X
O|O|O
***Index 77 Is Invalid***
4
***USER 1 TURN***
|X|
|X|X
O|O|O
***Index 4 Used***
2
***USER 1 TURN***
|X|X
|X|X
O|O|O
***COMPUTER is the winner.***
WELCOME TO TIC-TAC-TOE - PYTHON 3
PLAY AGAINST COMPUTER?(Y OR N) : N
PLAYING AGAINT COMPUTER: False
---INSTRUCTIONS---
USE INDEX TO PLACE PIECE
---BOARD TEMPLATE---
0|1|2
3|4|5
6|7|8
USER_1 PIECE: X
USER_2 PIECE: O
BEGIN GAME NOW
3
***USER 1 TURN***
||
X||
||
||
X||
||
4
***USER 2 TURN***
||
X|O|
||
||
X|O|
||
1
***USER 1 TURN***
|X|
X|O|
||
|X|
X|O|
||
2
***USER 2 TURN***
|X|O
X|O|
||
|X|O
X|O|
||
6
***USER 1 TURN***
|X|O
X|O|
X||
|X|O
X|O|
X||
7
***USER 2 TURN***
|X|O
X|O|
X|O|
|X|O
X|O|
X|O|
8
***USER 1 TURN***
|X|O
X|O|
X|O|X
|X|O
X|O|
X|O|X
9
***USER 2 TURN***
|X|O
X|O|
X|O|X
***Index 9 Is Invalid***
1
***USER 2 TURN***
|X|O
X|O|
X|O|X
***Index 1 Used***
0
***USER 2 TURN***
O|X|O
X|O|
X|O|X
O|X|O
X|O|
X|O|X
7
***USER 1 TURN***
O|X|O
X|O|
X|O|X
***Index 7 Used***
5
***USER 1 TURN***
O|X|O
X|O|X
X|O|X
***NOBODY is the winner.***
WELCOME TO TIC-TAC-TOE - PYTHON 3
PLAY AGAINST COMPUTER?(Y OR N) : N
PLAYING AGAINT COMPUTER: False
---INSTRUCTIONS---
USE INDEX TO PLACE PIECE
---BOARD TEMPLATE---
0|1|2
3|4|5
6|7|8
USER_1 PIECE: X
USER_2 PIECE: O
BEGIN GAME NOW
0
***USER 1 TURN***
X||
||
||
X||
||
||
1
***USER 2 TURN***
X|O|
||
||
X|O|
||
||
2
***USER 1 TURN***
X|O|X
||
||
X|O|X
||
||
3
***USER 2 TURN***
X|O|X
O||
||
X|O|X
O||
||
4
***USER 1 TURN***
X|O|X
O|X|
||
X|O|X
O|X|
||
5
***USER 2 TURN***
X|O|X
O|X|O
||
X|O|X
O|X|O
||
6
***USER 1 TURN***
X|O|X
O|X|O
X||
***USER_1 is the winner.***