Giter Club home page Giter Club logo

guess-that-lang's Introduction

Guess That Lang!

Share Your High Score

CLI game to see how fast you can guess the language of a code block!

If you like the game, please consider giving a ⭐!

Game Demo

Code is retrieved from 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

Installation

Building From Source

⚠️ Rust 1.63.0 or higher is required to build the binary. Rust can be updated with rustup update.

Install Rust using the recommended rustup installation method and then run:

cargo install guess-that-lang

Using Prebuilt Binaries

Prebuilt binaries are available for Windows, Linux, and macOS and can be found attached to the latest release.

Usage

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

# 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

Acknowledgements

This game takes heavy inspiration from both guessthiscode and stripcode.

Contributing

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.

guess-that-lang's People

Contributors

lioness100 avatar moskalyka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.