5 – Simon Says – Images

Many modern programs, like GUIs, window managers, spreadsheets, word processors, and games, use a programming model based on the handling of events. Hence, we are going to study them and talk about EDP – Event Driven Programming.

Class work

Let’s start building the game.

Topics for today

  • Local and global variables
  • Scope
  • Event-driven programming:
    • peripherals
    • drivers
    • interrupts
    • events
    • event handlers

Our goal: Simon Says (click on the image to play it)

Click the image to play

Click the image to play


Download in class: simon-says.zip

Individual files:

Initial templates

  1. template.html: Initial HTML template

  2. template.js: Initial javascript page

  3. Our page so far: template.html

v0 – HTML content and the images of the lightbulbs

  1. simon_0.html: Main HTML content

  2. lib0.js: Image toggle, listening of mouse events

  3. Our page so far: simon_0.html