WebSys Spring 2008 HW2


HW2 - JavaScript Memory Game

Due Date: Feb 22nd by 11:59PM

You may work with a single partner on this project. You must both submit, and your page should include both of your names (displayed when we load your game in our browser).




Memory Game:

You need to create a simple memory game using JavaScript. The general idea is that the user is presented with a 4x4 grid in which there are matching picture/numbers/letters/whatever you want. The user clicks on two cells, and if they match they remain visible. If they don't match the images/whatever become hidden.

There are 12,398 versions of this game on the WWW, here are a few (in case you don't understand the game):

Requirements:

Your game must be written in JavaScript

No Frames

The user must be able to start a new game whenever they want.

There must be some recognition that the game is over (the page should tell the user they have won).

It must be possible to win (the game must work correctly).

You must control the appearance (use CSS!)


Go grazy! Try supporting various board sizes (selectable by the user). Try allowing the user to select among a set of themes (numbers vs. images of dogs, vs images of cats, whatever...)

Feel free to borrow Javascript code you find on the web for special effects or extra functionality - but you must write all of the basic game functionality yourself. Any code that you borrow must be documented in your HTML document, for example:

<!-- 
// This code flashes an image - code swipped from www.imageflasher.com/javascript
-->
Grading:

If you work with a partner, we expect more!

Part of your grade will depend on a brief meeting with Dave or Sujing. We will ask you to go over your code with us, and will ask you to make some minor changes. If we don't think you understand your own code, you won't get a good grade...