Tic Tac Toe Lab
Required Game components
- A user should be able to click on different squares to make a move.
- When a square is clicked, there should be visual feedback.
- Every click will alternate between being for Player 1 or Player 2. The visual feedback should indicate whose turn it is.
- A cell should not be able to be replayed once marked.
- Add a reset button that will clear the contents of the board.
- Display a message to indicate which turn is about to be played.
- After the necessary moves have been played, stop game and alert the
winner if one player ends up winning with three in a row.
- Hint: Determine a set of winning combinations. Check those combinations on the board contents after every move.
- Fork this repo into your account.
- Once the forking is complete, clone the repo onto your computer.
- From the command-line:
npm i(this will get all the tools necessary for this exercise)
- You have been given blank index.html, script.js, and style.css files. Please use those files to complete your work.
- Use an HTML form to allow players to enter their names
- Style it! give it a personal flavor.
- Check out the website bitbaloon and host your game there.
- We once had a student implement an Artifical Intelligence (AI) opponent. If you really need a challenge, write some code that will play a game of Tic Tac Toe against you. (Hint: look into the minimax algorithm).
- Everyone's game will look different but you can check out the following screenshots to get some basic design ideas.