Skip to content

Creating a simple tic tac toe game (terminal based). Currently the computer's move is totally random, in future we need to improve it.

Notifications You must be signed in to change notification settings

pall-pandiyan/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

tic-tac-toe

Creating a simple tic tac toe game (terminal based). Currently the computer's move is totally random, in future we need to improve it.

ttt.py

In 'ttt.py' I simply implement a 3x3 tic tac toe game. But i feel this one is not scalable to a bigger board for bigger challange. The condition for checking if a player or computer won is seems very hard coded and not at all flexible.

ttt-2.py

I started the 'ttt-2.py' with sole intention of creating something more stable and flexible. In the end I am somewhat satisfied with this result i got. Now i can change the board size (both row and colume number should be a same number for obvious reasons).

Future aspects of improvements

Now if the set the board size to 3x3, the game is somewhat playable. The reason for this is for every computer's turn i randomly picking a empty cell and mark it.

In future i want to choose the best position to win the player.

About

Creating a simple tic tac toe game (terminal based). Currently the computer's move is totally random, in future we need to improve it.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages