An open API service indexing awesome lists of open source software.

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.

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