8 – Simon Says – comparing sequences

We finish the DOM Simon Says game.

Class work

Let’s finish the game. We need to record the sequence that the user plays and compare it with the original sequence. Also, we will apply the style to the page using CSS.

Topics for today

  • the <form> html tag


Download in class: simon-says.zip

Individual files:

V3 – Sequence comparison

  1. simon_3.html: the only change is to point to the new js script

  2. lib3.js: comparing the input sequence with the stored sequence

  3. Our game so far: simon_3.html

v4 – Variable sequences and CSS

  1. simon_4.html: adding a field to input a length for the sequence and a link to the style file

  2. lib4.js: finishing touches

  3. style.css: the style file

  4. The final result (click on the image to play):
    Click the image to play

    Yay! We did it!