Skip to content

fabientownsend/tictactoe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

209 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status codecov

#Unbeatable Tic-Tac-Toe tictactoe

Here you can find documentation that I wrote about the project, I tried to cover subject like architecture and algorithm.

Firstly you need to have python 2.7 to be installed

python 2.7.11

If you don't use Vagrant you will also need to install pip the Python's package manager and the package enum34.

On Mac

$ sudo easy_install pip
$ pip install enum34

On Debian and Ubuntu

$ sudo apt-get install python-pip
$ pip install enum34

On Windows

You have to add the pip.exe which is install into you python/scripts folder to your environment variable

$ pip install enum34

Installation

$ git clone https://github.com/fabientownsend/tictactoe

Run with Vagrant

$ cd /tictactoe
$ vagrant up
$ vagrant ssh

Test the application

Running all tests:

$ python -m unittest discover

Running a single test class:

$ python -m unittest tests.test_computer

Running a single test method:

$ python -m unittest tests.test_comuter.test_computer.test_set_mark_with_cross

Usage

Runn the game

$ cd /src
$ python python main.py
  1. First menu you can choose the language 1 and 2
  2. First menu you can choose the game mode between 1, 2 and 3
  3. You have to pick up which player start between 1 and 2
  4. You can put a mark on the board between 0 and 8

Example 1

$ python main.py # launch the game
$ 1 # English language
$ 1 # Human v. Human game
$ 1 # Player1 will start
$ 4 # You will put your mark at the position 4

Example 2

$ python main.py
$ 1 # English language
$ 2 # Human v. Computer game
$ 2 # Player2 (the computer) will start, you can't beat him

Example 3

$ python main.py
$ 2 # French language
$ 2 # Computer v. Computer game
$ 2 # Player2 will start

TODO

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages