Lights Out Game and Solver
An implementation of the Lights Out game and solver.
Game Rules
The Game consists of a square grid of lights. Each light can be pressed. Doing so toggles it and the 4 adjacent lights individually. The goal is to switch on all lights.
Controls
Besides clicking on the lights there are four controls on the right of the screen.
-
Resets all lights and switches to their off position. Reset
-
Allows specifying the size of the game. Field size entry
-
Shows the lights to press to activate all lights. Solve
-
Toggle click action
Toggles the clicked light and the ones surrounding it according to the games rules. Switch activations on click:
Toggles the individual clicked light without the surrounding ones. This mode allows recreating game states to play or solve them. Switch lights on click:
Build from source
The game is written entirely in Rust, which makes it
- Open terminal in the root of the project directory
- Run
cargo build --release
- The executable can be found at
./target/release/lights-out.<exectuable file extention>
If Rust is not available it can be installed with very little effort by following the official instruction here.
About
This project was created to solve puzzles in the game Heroes of Hammerwatch and gain experience with Slint UI development.