* chore: remove unnecessary needs_render checks from game logic * chore: remove needs_render flag and related logic from game state * chore: add rustfmt configuration file for consistent formatting * chore: clean up imports and formatting in app.rs, binary_numbers.rs, main_screen_widget.rs, rustfmt.toml, and utils.rs * chore: remove outdated comment from binary_numbers.rs * chore: remove outdated comments from binary_numbers.rs * chore: extract game over rendering logic into a separate function * run clippy fix * chore: add Clippy configuration files for linting thresholds * run clippy fix * chore: allow clippy warnings in selected places. check fix later * docs: add command docs for linting and formatting * docs: add command docs for linting and formatting * split BinaryNumbersPuzzle.render_ref into several sub functions for rendering different areas. * chore: adjust clippy lint levels to allow certain patterns * chore: add CI configuration with testing, clippy, and formatting jobs * cargo fmt * chore: simplify clippy and formatting commands in CI configuration * chore: consolidate cargo caching in CI configuration * chore: replace cargo caching with rust-cache action in CI configuration * chore: use is_multiple_of for streak check in score calculation * chore: simplify game over check in render logic
2.6 KiB
https://github.com/user-attachments/assets/4413fe8d-9a3f-4c00-9c1a-b9ca01a946fc
Guess the correct number (from binary to decimal) before time runs out!

Includes 16-bit mode as well, when you feel a little bit insane.

Includes multiple 4-bit modes, to train individual nibbles.

Colorblind friendly
I discovered usability issues early on while testing on a monochromatic terminal emulator,
and took this as a challenge to make it work well regardless of color perception.

Can you crack the high score?
The longer your streak, the more points you get, but the faster the timer runs out!
High scores are tracked for each game-mode separately, and saved in a text file relative to the executable.
Play
Download the release for your platform, see Releases.
There is one file for linux and one for windows (.exe).
Linux
- download the file
binbreak-linux - open a terminal and navigate to the folder where you downloaded it, e.g.
cd ~/Downloads - make it executable:
chmod +x binbreak-linux - run the game:
./binbreak-linux
Controls
- use the arrow or vim keys for navigation
- press Enter to confirm choices
- press Esc or Q to exit a game mode or the game. CTRL+C also works to exit the game.
Recommended terminals
The game should run fine in any terminal. If you want retro CRT effects, here are some recommendations:
- Windows: Windows Terminal (enable experimental "retro mode")
- Linux: Rio (with CRT shader), Cool Retro Term
Build/Run from source
You may be inclined to not run binaries from the internet, and want to build from source instead.
- download the source code
- make sure you have Rust and Cargo installed, see rustup.rs
- open a terminal and navigate to the folder where you downloaded the source code, e.g.
cd ~/Downloads/binbreak - build the project:
cargo build --release
Run
cargo run --release
Contributing
All pull requests are automatically checked by GitHub Actions CI, which runs tests, clippy, and formatting checks on Linux, Windows, and macOS.
Test
cargo test
Lint
cargo clippy
Format
cargo fmt
License
MIT license (LICENSE or http://opensource.org/licenses/MIT)
