This is a Tic Tac Toe game you can play in your browser!
- Set up your project with a HTML, CSS and Javascript files and get the Git repo all set up.
- You’re going to store the gameboard as an array inside of a Gameboard object, so start there! Your players are also going to be stored in objects… and you’re probably going to want an object to control the flow of the game itself.
- Set up your HTML and write a JavaScript function that will render the contents of the gameboard array to the webpage (for now you can just manually fill in the array with "X"s and "O"s)
- Build the functions that allow players to add marks to a specific spot on the board, and then tie it to the DOM, letting players click on the gameboard to place their marker. Don’t forget the logic that keeps players from playing in spots that are already taken!
- Build the logic that checks for when the game is over! Should check for 3-in-a-row and a tie.
- Clean up the interface to allow players to put in their names, include a button to start/restart the game and add a display element that congratulates the winning player!
- Optional - If you’re feeling ambitious create an AI so that a player can play against the computer!
- HTML5
- CSS
- Bootstrap
- Javascript ES6
To get a local copy up and running follow these steps:
- npm
- webpack
- jest
- Clone the repository.
- cd into js-tic-tac-toe folder
- Run
npm install
. - Run
npm run test
from your command line. - Run
npm run dev
to play the game.
- Fork/Clone this project to your local machine
- Open folder in your local enviroment and run these lines of code to get started:
- Double click on index.html
- To view in IDE just open project folder in your prefered IDE
👤 Mark James Kiptubei
- Github: @kiptubei
- Twitter: @mjabei
- Linkedin: Mark James Kiptubei
👤 Tendongze Godson
- Github: tGodson
- Twitter: @tendongze95
- Linkedin: linkedin
Contributions and feature requests are welcome!
Start by:
- Forking the project
- Cloning the project to your local machine
cd
into the project directory- Run
git checkout -b your-branch-name
- Make your contributions
- Push your branch up to your forked repository
- Open a Pull Request with a detailed description to the development(or master if not available) branch of the original project for a review
Give a ⭐️ if you like this project!