Coder Social home page Coder Social logo

wdi_8_js_lab_jquery_tic_tac_toe's Introduction

#Title: jQuery TicTacToe Lab

Assignment

Work in pairs to create a Tic Tac Toe game with jQuery.

Tic Tac Toe is a game where 2 players alternate turns and try to get 3 boxes in a row (either a row, column, or diagonal). Provide a message on the screen when a player wins, with a button to start a new game. Also, make sure to check for stalemates.

Before you start, consider how you will best track the state of the game.

The CSS and HTML has already been provided and needs minimal (if any) modification.

Tic Tac Toe Screenshot

To do:

  • Get the cells to change color when you click on them
  • Get the cell color to alternate on turn
  • Add logic to check if a player has gotten 3 in a row for a row
  • Do the same for columns and diagonals

Bonus:

  • Are there ways to refactor your code to make it DRYer?
  • Can you have it so that a player plays against a computer rather than another player?
  • Can you make the computer unbeatable?

wdi_8_js_lab_jquery_tic_tac_toe's People

Contributors

tibbon avatar tdyer avatar fishermanswharff avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.