| Crates.io | rusty-lights |
| lib.rs | rusty-lights |
| version | 1.0.0 |
| created_at | 2025-11-23 21:48:46.737183+00 |
| updated_at | 2025-11-23 21:48:46.737183+00 |
| description | The lightsout game written in rust. |
| homepage | https://github.com/Arom1a/rusty-lights |
| repository | https://github.com/Arom1a/rusty-lights |
| max_upload_size | |
| id | 1947018 |
| size | 62,866 |
A TUI version of the lightsout game written in Rust.
Highlights:
loplayer used for CMU 15-122. 2cargo install rusty-lights
$ rusty-lights --help
The lightsout game written in rust.
Usage: rusty-lights [OPTIONS] [FILE]
Arguments:
[FILE] Start the game from a given file. If not provided, the program will
randomly generate games with a 5x5 board
Options:
-v, --variant When present, play the variant version of lightsout: a
tap will switch lights on the whole row and the whole
column
-W, --width <WIDTH> The width of the board. The width and the height
should be both provided at the same time. This field
will be omitted if a specific file is given
-H, --height <HEIGHT> The height of the board. The width and the height
should be both provided at the same time. This field
will be omitted if a specific file is given
-t, --tui Play the TUI version of the game. Note that this flag
only takes effect when a file is given
--enable-solver Enable the solver
-h, --help Print help
-V, --version Print version
Examples:
$ rusty-lights boards/5x5_eg1.txt
Try your best to get all the lights out!!!
Now enter the 0-indexed coordinate you want to tap in "row:column" form:
● ○ ○ ○ ○
○ ○ ○ ○ ○
○ ○ ○ ○ ○
○ ○ ○ ○ ○
○ ○ ○ ○ ○
1:3
Flipping 1:3
● ○ ○ ● ○
○ ○ ● ● ●
○ ○ ○ ● ○
○ ○ ○ ○ ○
○ ○ ○ ○ ○
2:4
Flipping 2:4
● ○ ○ ● ○
○ ○ ● ● ○
○ ○ ○ ○ ●
○ ○ ○ ○ ●
○ ○ ○ ○ ○
$ rusty-lights -W 3 -H 5
# This starts a random game with a board of 3 rows and 5 columns
$ rusty-lights -W 3 -H 5 -v
# This starts a random variant game with a board of 3 rows and 5 columns
$ rusty-lights -W 3 -H 5 --enable-solver
# This starts a game with the solver enabled
$ rusty-lights ferris.txt
# This starts a game from the board file "ferris.txt" and play with cli
$ rusty-lights ferris.txt --tui
# This starts a game from the board file "ferris.txt" and play with tui