8 – Simon Says – comparing sequences

We finish the DOM Simon Says game.

Class work

This week we are going to 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

Final result: Simon says (click on the image to play it)

Click the image to play

Click the image to play

Workfiles

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
     

     

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