kurtismullins / Tic-Tac-Toe

An impossible to beat, web-based game of Tic-Tac-Toe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tic-Tac-Toe

Overview

Tic-Tac-Toe is a simple game where two players compete to place three of their "pieces" in a straight or diagonal line. (Read More)

This Project turns Tic-Tac-Toe in to a fun, web-based game where players can try to defeat the Computer player. It is implemented using Django and HTML5.

Usage

Here are the steps to quickly get this game up and running on your system:

  1. Clone this repository
  2. Create a Virtual Environment for this project.
  3. Enter the Virtual Environment.
  4. Install the dependencies: pip install -r requirements.txt
  5. Create the database: python manage.py syncdb
  6. Start Django's built-in HTTP Server: python manage.py runserver
  7. Open the game on your web browser by browsing to localhost:8000

Dependencies

Artificial Intelligence

The Artificial Intelligence is based upon the Perfect Strategy laid out in the Wikipedia article. It currently implements most of the strategy with the exception of the Fork and Block Forks steps. While there is room for improvement to increase the opportunity for the Computer player to win, my manual testing has shown that the game will always win in either a Draw or a Computer Victory.

About

An impossible to beat, web-based game of Tic-Tac-Toe


Languages

Language:Python 86.9%Language:JavaScript 8.8%Language:CSS 4.3%