Inspiration

LightsOut puzzle is a game which I have many memories associated with. Thus when I saw that in the hackathon that I will have to build a game, the first game that came to my mind was this. I thought of building an app for this game which will have the colors I want, the ui I want.

What it does

In this game, there are 2 modes, 3x3 or 5x5. The rules for both modes are same, there are lights given in matrix form with some of the lights ON. The goal is to switch OFF all the lights in the board. But this is not simple as when one switches a light ON or OFF, the lights adjacent to it also gets switched ON or OFF.

How I built it

I built it with flutter so that the game can run on both android and ios.

Challenges I ran into

Currently the initial state of the game is given by me in the code, I tried to generate the initial state randomly but some error is there which I couldn't resolve for now. Another challenge I faced was to find out how to connect the adjacent lights, but I figured that out eventually.

Accomplishments that I'm proud of

This was the first game I built, I am proud of myself for that.

What I learned

I learned that I need to revise data structures. Though I have used flutter before but I haven't tried functionality in buttons so much but after this game I can say I have explored that area pretty extensively.

What's next for LightsOut

To generate the initial state of the lights randomly. The code is a bit messy and believe can be made more modular, so I will try that Applying orientation feature to it so that it can display properly even if the phone is in landscape mode

Built With

Share this project:

Updates