Skip to content

generalassembly-atx/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe

Time to put your knowledge of Javascript and jQuery to the test!

Enclosed you'll find an already made tic-tac-toe board. Your job is to make the game actually work using Javascript and jQuery.

  • You can add as many class and id attributes as you need to the HTML
  • jQuery has already been added
  • Don't worry about CSS, just make the game work!

Here are the user stories:

Gameplay:

  • When the page loads, Player 1 (X) is the first player to go
  • When Player 1 clicks an empty cell, it should be marked with an "X", and Current Player should switch to two
  • When Player 2 clicks an empty cell, it should be marked with an "O", and Current Player should switch back to one
  • If a player clicks a cell that has already been marked, they should see an alert letting them know that the cell in question has already been taken

Winning:

  • When a player gets three in a row in any direction, the board should should be wiped clean, and that player's score should be incremented
  • The game should then start over with the losing player getting to go first

Bonus

No game is complete without some kind of easter egg. Add a cheat code, or something along those lines to make the game more interesting!

Licensing

All content is licensed under a CC­BY­NC­SA 4.0 license. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.

Releases

No releases published

Packages

No packages published