Game Description and Initial Setup

Understand the description of the game and do some basic setup for it.

Description

Framed will create a 3x3 grid of lights, some on (red) and others off (black). Clicking lights will toggle the on/off state of a group of lights:

  • Click a corner light to toggle the four lights in that corner.
  • Click a middle side light to toggle all the lights on that side.
  • Click the center light to toggle it and the lights directly above, below, and to each side of it.
  • The goal is to turn on all but the center light, thus forming a frame.

Here is a screenshot of the Framed program when the game is started:

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy