/tic-tac-toe

Tic Tac Toe is a game for 2 players. You can play against the computer or another human player.

Primary LanguageJavaScript

Tic Tac Toe

Tic Tac Toe is a game for 2 players. You can play against the computer or another human player. The aim of this project is to have functionality similar to https://codepen.io/freeCodeCamp/full/KzXQgy/.

UX

Tic Tac Toe is a game for 2 players. Each player marks a symbol (e.g. X) in one of the nine squares. Play continues until one player has three of his/her symbols in a row (diagonally, horizontally or vertically) or when the board is full. The winner is the first player to have three of his/her symbols in a row (diagonally, horizontally or vertically). You can play against the computer or against another human player.

Getting Started

Choose how you would like to play (One Player - Against the Computer or Two Player - Against a Human Player). If you make a mistake, select ehe one with the left arrow. If you play aainst the computer, you can choose X or O. If you choose X, the computer chooses O. If you choose O, the computer chooses X. If you play against the human player, the first player chooses X or O. Each player marks the symbol (e.g. X) in one of the nine squares. Play continues until one player has three of his/her symbols in a row (diagonally, horizontally or vertically) or when the board is full. The winner is the first player to have three of his/her symbols in a row (diagonally, horizontally or vertically). If the board is full and no player has three of his/her symbols in a row (diagonally, horizontally or vertically), the game is a draw. You can reset at any time, even before the outcome of the game. This is useful in an emergency.

User Stories

As a user, I can play a game of Tic Tac Toe with the computer.

As a user, my game will reset as soon as it is over so I can play again.

As a user, I can choose whether I want to play as X or O.

Information Architecture

The board is an object. It has the keys of 1,2,3,4,5,6,7,8 and 9. Its values are '','O' and 'X'.

Wireframes

Features

You can play against the computer with a choice of X or O. You can reset at any time, even before the outcome of the game. This is useful in an emergency.

Technologies

Uses HTML5, CSS3, Font Awesome 5.15.3, Google Fonts, jQuery 3.6.0 and JavaScript.

Testing

Ensure all the user stories have been met.

Deployment

Deployed on GitHub Pages at the main branch.

Credits

Content

Most of the code is taken from FreeCodeCamp

Acknowledgements