Skip to content

Instantly share code, notes, and snippets.

@jreich5
Last active August 16, 2021 17:30
Show Gist options
  • Save jreich5/cd41f3ed9c593e16e0db05f47faef26e to your computer and use it in GitHub Desktop.
Save jreich5/cd41f3ed9c593e16e0db05f47faef26e to your computer and use it in GitHub Desktop.

Build a Tic-tac-toe Game

  1. Create a playable Tic-tac-toe board board game with unique styling and animations using jQuery.

    • Clicks should alternate between the unicode symbol or images for X's and O's when clicking tiles.
    • The current player's turn should be displayed after each click.
    • Clicked tiles should no longer be clickable.
    • A button should be included to start or restart a new game.
  2. Hard Challenge - make the game winnable by detecting when a player gets three-in-a-row.

    • Create a customized win message based on which player won.
    • Change the css of the tiles that create the three-in-a-row winning pattern.
  3. EXTRA HARD CHALLENGE - create a playable AI opponent that will play defensively if you are a click away from winning and offensively otherwise.


example game

@jreich5
Copy link
Author

jreich5 commented Aug 16, 2021

Example video for Tic Tac Toe functionality: https://www.youtube.com/watch?v=M5jJkL4zHAI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment