https://github.com/sharvin26/tictactoe
A Simple tictactoe game built using python.
https://github.com/sharvin26/tictactoe
Last synced: about 2 months ago
JSON representation
A Simple tictactoe game built using python.
- Host: GitHub
- URL: https://github.com/sharvin26/tictactoe
- Owner: Sharvin26
- Created: 2019-12-20T09:55:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-21T16:19:33.000Z (over 5 years ago)
- Last Synced: 2025-01-18T09:45:56.001Z (3 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TicTacToe Game
This is a tictactoe game built using python3.7. It's a terminal based application.
### Prerequistes:
* Python 3.7 required.
* It requires a colorama package.### Installing package:
`pip install -r requirements.txt`### To run the game use command:
`python3.7 tictactoe.py`### Game Example:
```
➜ python3.7 tictactoe.py
Enter the size of tictactoe game you wanna play? 3
0 1 2
0
1
2
Current player: 1
What column do you want to play? ( eg: 0, 1, 2 ): 0
What row do you want to play? ( eg: 0, 1, 2 ): 0
0 1 2
0 X
1
2
Current player: 2
What column do you want to play? ( eg: 0, 1, 2 ): 1
What row do you want to play? ( eg: 0, 1, 2 ): 0
0 1 2
0 X O
1
2
Current player: 1
What column do you want to play? ( eg: 0, 1, 2 ): 1
What row do you want to play? ( eg: 0, 1, 2 ): 1
0 1 2
0 X O
1 X
2
Current player: 2
What column do you want to play? ( eg: 0, 1, 2 ): 2
What row do you want to play? ( eg: 0, 1, 2 ): 0
0 1 2
0 X O O
1 X
2
Current player: 1
What column do you want to play? ( eg: 0, 1, 2 ): 2
What row do you want to play? ( eg: 0, 1, 2 ): 2
0 1 2
0 X O O
1 X
2 X
Player 1 is the winner diagonally ( \ )!!
Game is over, would you like to play again?? ( y/n ): n
GoodBye....
```