Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💡 Lights Out

Lights Out built with Flutter, 5x5 grid. Tap a light to toggle it and its orthogonal neighbors; turn every light off to win.

Flutter Dart Platform

Why the generator is worth mentioning

Not every possible on/off light pattern on a 5x5 board is actually solvable — Lights Out's reachable states are a proper subset of all 2^25 configurations. Generating a puzzle by lighting random cells directly can silently produce one that can't be solved.

This generator instead scrambles from the solved (all-off) board using the same toggle move the player uses. Since a toggle is its own inverse and toggles commute, replaying whatever sequence scrambled the board always undoes it — which proves every generated puzzle is solvable by construction, not by luck. Verified with a test that does exactly that: scrambles with a captured move sequence, then replays it and confirms the board returns to solved.

Getting started

flutter pub get
flutter run
flutter test

About

💡 Lights Out built with Flutter, provably-solvable puzzle generator (scrambles from solved, not random cells).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages