Crates.io | guess-that-lang |
lib.rs | guess-that-lang |
version | 1.0.20 |
source | src |
created_at | 2022-08-08 00:53:40.351019 |
updated_at | 2022-08-22 01:50:31.427259 |
description | CLI game to see how fast you can guess the language of a code block! |
homepage | |
repository | https://github.com/Lioness100/guess-that-lang |
max_upload_size | |
id | 640475 |
size | 474,239 |
CLI game to see how fast you can guess the language of a code block!
If you like the game, please consider giving a ⭐!
Code is retrieved from either random repos or random gists on GitHub using any of the top 24* most popular languages from the Stack Overflow 2022 Developer Survey. *VBA is replaced with Dockerfile
The code is then processed in a number of ways to make the experience more enjoyable.
Prebuilt binaries are available for Windows, Linux, and macOS and can be found attached to the latest release.
⚠️ Rust 1.63.0 or higher is required to build. Rust can be updated with
rustup update
.
Install Rust and then run:
cargo install guess-that-lang
It's strongly recommended to provide a Github personal access token. This will allow the game to make more Github requests before getting ratelimited. Click here to make one (no scopes are required).
⚠️ Resizing the terminal window while playing will cause the game to go a bit wonky.
# Tokens will be stored in a config file so you only need to input them once.
guess-that-lang --token "XXX" # or -t
# Get code from gists rather than repos.
# Repos generally provide better code quality, but gists require less API calls.
guess-that-lang --provider gists # or -p
# Wait 5 seconds after showing the options before starting to reveal code. (Default: 1500)
guess-that-lang --wait 5000 # or -w
# Reveal lines in random order instead of top to bottom. (Default: false)
guess-that-lang --shuffle # or -s
# Theme overrides will be stored in a config file so you only need to input them once.
guess-that-lang --theme dark
guess-that-lang --theme light
This game takes heavy inspiration from both guessthiscode and stripcode.
I'm a beginner at Rust, so if you see any code that can be improved or have any general ideas, please let me know! Feel free to open an issue or a pull request.