Skip to content

alvaropsouza/rust-number-guesser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guess-the-Number Game in Rust

Welcome to the Guess-the-Number game written in Rust! Test your luck and see if you can guess the secret number.

How to Play

  1. Clone this repository to your local machine:

    git clone https://github.com/alvaropsouza/rust-number-guesser.git
  2. Navigate to the project directory:

    cd guess-the-number
  3. Build and run the game:

    cargo build
    cargo run
  4. Follow the prompts to input your guess and try to discover the secret number!

Prerequisites

Make sure you have Rust installed on your machine. If not, you can download and install it from https://www.rust-lang.org/tools/install.

Gameplay

  • The game will generate a random number between 1 and 100.
  • You'll be prompted to input your guess.
  • If your guess is too small, the program will let you know.
  • If your guess is too big, the program will inform you as well.
  • If your guess is correct, congratulations, you win!

Error Handling

The program is designed to handle input errors gracefully. If you accidentally type a non-numeric value, the program will prompt you to enter a valid number.

Contribution

Feel free to contribute to this project by opening issues or submitting pull requests. Your feedback and improvements are highly appreciated!

License

This project is licensed under the MIT License - see the LICENSE file for details.

Enjoy the game and happy coding! 🚀

About

A number guesser puzzle. First steps with rust, practicing basic concepts such as let and match.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages