Skip to content

umcconnell/tic-tac-toe

Repository files navigation

tic-tac-toe

An overengineered, underdesigned, unbeatable tic-tac-toe game.

Docs

Table of Contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You will need python3 and pip3 installed on your machine. You can install it from the official website https://www.python.org/.

Initial setup

A step by step series of examples that tell you how to get a virtual python environment running:

Clone the git repository and navigate into the folder:

git clone https://github.com/umcconnell/tic-tac-toe.git
cd tic-tac-toe/

Then create your virtual environment and activate it:

python3 -m venv venv
source venv/bin/activate

To exit the virtual environment run

deactivate

Next, install the dependencies:

python -m pip install -r requirements.txt

Finally, start the app:

python main.py
# To play against an unbeatable AI, run:
# python main.py --ai minimax

Happy coding!

Distributing

Installing

To get started, activate the virtual environment:

source venv/bin/activate

Install the packages from requirements.txt:

python -m pip install -r requirements.txt

Installing additional packages

After activating the virtual environment, install your package(s):

python -m pip install <package>

Then freeze your packages:

python -m pip freeze > requirements.txt

Contributing

Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

Ulysse McConnell - umcconnell

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

See also

Check out the great project, including explanatory video, from Dan Shiffman on The Coding Train about the MiniMax algorithm: https://thecodingtrain.com/CodingChallenges/154-tic-tac-toe-minimax.html

For a thorough explanation and walk-through of the Minimax algorithm, make sure to look at this video from Sebastian Lague.

Also, look at the great official python 3 tutorial and especially chapter 12 about virtual environments.

Acknowledgments