Lesson 6: Finishing Up

This video will likely be best viewed in fullscreen mode.  It's about 8 minutes long.  You can download the resulting file below.

In this lesson, we fix the game so that we can reset it when we're done; we also change the game so that the same player doesn't get to go first all the time.  We also stop players from making moves after the game is over.

Some thoughts:
  • What would you do to make a 1-player version of this game?
  • Could you create a new div tag to keep track of X wins and O wins?
  • Could you increase the size of the gameboard and make it a connect-4 game?  What would you change?

I hope you've enjoyed these exercises.  If you're interested in learning more about HTML, Javascript, or CSS, W3 Schools is a great resource with lots of examples.
Timothy James,
Apr 24, 2014, 1:02 PM