mattcameron / Tic-Tac-Toe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tic Tac Toe

by Matt Cameron

A game project briefed by General Assembly, written in javascript.

Play game online

Features

The game has several bonus features included:

Multiple Game Modes

This Tic Tac Toe game has three different game options:

Regular

Standard Tic Tac Toe game between two users. Players alternate turns, selecting a square to insert their game piece (either 'X' or 'O').

Players attempt to line up three of their game pieces in a row, in any direction, while preventing their opponent from doing the same.

Once a player lines up three pieces in a row, the game is over.

If all squares are used and neither player has won, a tie is declared.

Speed

In this mode, players have only three seconds to make each move.

If a move has not been made within this time, the player forfeits his turn and the opposing player can play another piece.

VS Computer

Players can also opt to play versus the computer.

This one player game allows you to still enjoy Tic Tac Toe, even if you have no one to play with!

Scoreboard

Every time a game is won, the scoreboard is updated, so that you can keep count of the all-time score. This score will persist across browser sessions, and cannot be reset.

Resume Game Option

If you abandon a half-finished game (either because your cat is stuck in a tree, or you accidentally navigate away), when you reload the game, you will be given the option to resume your previous game.

Alternatively, you can simply start a new game as per usual.

Reset The Board

Once a game is over, you can wipe the board clean and start a new game.

Pro-tip: You can also use this if you are a bad loser, and your chances of winning aren't looking good. ;)

James' Bonus Bonus Bonus

If you ignore the warning and click the button in the bottom right hand corner, well... don't blame me.


Approach Taken

This project was built from scratch and heavily utilises jQuery for easy access and manipulation of the DOM.

It was built as simply as possible to begin with, and I have continually added features over time. As additional game modes were added, the code has become considerably busier.

About


Languages

Language:JavaScript 65.8%Language:CSS 24.1%Language:HTML 10.1%