An implementation of the Lights Out game and solver.
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.
Besides clicking on the lights there are four controls on the right of the screen.
- Resets all lights and switches to their off position.
- Allows specifying the size of the game.
- Shows the lights to press to activate all lights.
- Toggles the clicked light and the ones surrounding it according to the games rules. Toggles the individual clicked light without the surrounding ones. This mode allows recreating game states to play or solve them.
The game is written entirely in Rust, which makes it 🚀blazingly fast🚀. Building it is incredibly easy if Rust is already available:
- 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.
This project was created to solve puzzles in the game Heroes of Hammerwatch and gain experience with Slint UI development.