Skip to content

ikp4success/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe Game

How to run ?

python3 tic-tac-toe.py

Game Display Computer


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.***

Game Display users

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.***

Game Display User Win

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.***

About

simple tic-tac-toe game developed in python3.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages