Skip to content

Tic Tac Toe game developed in python; have 2 difficulty levels

Notifications You must be signed in to change notification settings

akshatmittal2002/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Tic Tac Toe Game

This is a code for Tic Tac Toe game in python.

Game has 2 difficulty levels.

  1. Easy
  2. Hard

To play the game, use this command in a LINUX terminal:

python3 main.py

Game will now begin.


A Brief desciption of process of game:

  1. First of all, user will be asked to select his symbol; either X or O.
  2. Then user will be asked to select difficulty level; either E (for EASY) or H (for HARD).
  3. Once ready, press Enter to start the game.
  4. First turn will be decided randomly and then moves will be alternate.
  5. 3x3 game board will be displayed, each box having a unique id. As game progresses, box id's will be replaced by symbols.
  6. In computer's turn, wait till computer select it's move.
  7. In EASY level, computer's move is just a random selection from all the availbale moves while in HARD level, computer uses MINIMAX Algorithm to find best possible move.
  8. In user's turn, enter box id for the block you want to move. If invalid id is chosen, error message will be displayed.
  9. Victory / Loss / Draw message will be printed as soon as game ends.

About

Tic Tac Toe game developed in python; have 2 difficulty levels

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages