| Crates.io | number-guessing |
| lib.rs | number-guessing |
| version | 1.0.0 |
| created_at | 2025-03-23 18:09:39.943343+00 |
| updated_at | 2025-03-23 18:09:39.943343+00 |
| description | A fun command-line number guessing game. |
| homepage | |
| repository | https://github.com/dossdortival/guessing-game |
| max_upload_size | |
| id | 1602932 |
| size | 18,733 |
Welcome to the Number Guessing Game! This is a simple and fun command-line game where you guess a randomly generated number within a specified range. The game provides hints to help you find the correct number, and you can play as many times as you like.
Clone the repository:
git clone https://github.com/dossdortival/number-guessing.git
Navigate to the project directory:
cd number-guessing
Build the project:
cargo build --release
(Optional) Install the game globally:
cargo install --path .
You can run the game in two ways:
Locally (without installing):
cargo run -- <min> <max>
Example 1 (default):
cargo run
Example 2:
cargo run -- 100 500
Globally (after installing):
number-guessing <min> <max>
Example 1 (default):
number-guessing
Example 2:
number-guessing 100 500
| Argument | Description | Default |
|---|---|---|
<min> |
The minimum number in the range. | 1 |
<max> |
The maximum number in the range. | 100 |
--no-color |
Disable colored output. | false |
Example with all options:
number-guessing 100 500 --no-color
Start the Game:
10 500).Guess the Number:
Use Hints:
Win the Game:
Play Again:
After winning, you can choose to play again or exit the game.
We welcome contributions! If you'd like to contribute to this project, please follow these steps:
Please ensure your code follows the project's style and includes appropriate tests.
This project is licensed under the MIT License. See the LICENSE file for details.
Enjoy the game! 🚀 If you have any questions or feedback, feel free to open an issue or reach out.