Skip to content

LightsOut programming: level 3 #9

Description

@atodorov
  • when play mode starts it will initialize a predefined number of LEDs = X
  • X == 5 - level number, in this case X == 5 - 3 == 2
  • leds that light up should be chosen randomly from the entire matrix. If easier think about them as X random out of 16!
  • In play mode each button press controls groups of buttons using inversion (like in the original LO):
    • if lighted up => go dark
    • if dark => light up
  • Each level uses a different geometric shape to define the group which is controlled via single button press:
  • Some board configurations will not lead to a successful solution if you are trying to play the classical LO game. This is fine; no checking for this.
  • For the corner buttons the following implementation(s) are acceptable:
    • either consider that you have phantom rows/columns on all sides (to make the algorithm straight forward and not do any error checks) or
    • if easier check if the resulting (horizontal, vertical) address represents an invalid location (e.g. no such physical LED + button) and skip it.

For more info see #5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions