Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LightsOut programming: level 3 #9

Open
atodorov opened this issue Sep 14, 2020 · 0 comments
Open

LightsOut programming: level 3 #9

atodorov opened this issue Sep 14, 2020 · 0 comments
Assignees

Comments

@atodorov
Copy link
Member

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants