No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
node_modules
.eslintrc.yml
README.md
index.html
jquery-3.3.1.min.js
package-lock.json
package.json
script.js
style.css

README.md

Tic Tac Toe Lab

tic-tac-toe meme

Objective: Build a tic tac toe game in HTML and JavaScript using jQuery.

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.

Getting Started

  1. Fork this repo into your account.
  2. Once the forking is complete, clone the repo onto your computer.
  3. From the command-line:
    • npm i (this will get all the tools necessary for this exercise)
  4. You have been given blank index.html, script.js, and style.css files. Please use those files to complete your work.

Bonus

  • 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.

Ultra Bonus

  • 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).

Deliverable

  • Everyone's game will look different but you can check out the following screenshots to get some basic design ideas.

Screen-shot Screen-shot Screen-shot