Skip to content

onderpala/tictactoe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Tic-Tac-Toe Game with Python

This is classic Tic-Tac-Toe game implemented with Python. Tiktaktoe is a turn based game where one player uses "X" while the other uses "O" in order to mark its place on a grid by 3x3. Goal is to make three of oneselves marks in a row, column or diagonal before the opponent does.

Prerequisities

  • Python 3.x

Installation

  1. Clone the repository
git clone https://github.com/onderpala/tictactoe
  1. Go to projects directory
cd tictactoe
  1. Run the game!
python tictactoe.py

How To Play

  1. Enter the tour limit (where the game ends)
  2. Each player, starting from P1('X' mark), makes its moves on the board.
  3. If anyone can achieve mark three places in a row, column or diagonally, he/she wins the round.
  4. When tour limit is reached game ends and game prints the scores and winner.

Running Tests

To run tests, run the following command

python test_tictactoe.py

Roadmap

  • Clean up written tests creating a class for every function in my Game class

  • Clean up documentation (Maybe I can create --help command)

  • Create tests for play_game function

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages