JavaScript/Exercises/MovingWalls

The example combines some of the shown features:
 * It contains a class  and its sub-class.
 * Some walls with a rectangular shape move from right to left across the scene. They reappear on the right side after reaching the left border.
 * Two smileys populate the scene.
 * One smiley can be moved by using the buttons or the keyboard keys 'ArrowRight', ....
 * Two helper-functions support the detection of rectangles:  and  . The first one detects the collision of a graphical object with a surrounding rectangle, e.g., the canvas. The second one detects a collision of two rectangles.

You can extend the example in various ways:
 * Create walls randomly.
 * Introduce some kind of a 'level' by changing the speed, the number, the size, or the shape of walls.