Welcome to the Guess the Number game! ๐ This is a fun and simple text-based game with an interactive interface where you try to guess a randomly generated number between 0 and 100. The game includes hints, limited attempts, and a user-friendly Text User Interface (TUI) to keep you engaged! ๐
This project is a Rust implementation of the classic "Guess the Number" game. The program generates a random number between 0 and 100, and the player must guess it within 7 attempts. The game provides feedback on whether the guess is too high, too low, or correct. Players are also offered up to 3 hints to assist them during the game.
This program was built and tested on a 64-bit Windows system using the pancurses
library for the interface.
- ๐ฒ Random number generation between 0 and 100.
- ๐ฎ 7 attempts to guess the correct number.
- ๐ก Up to 3 optional hints to help guide your guesses.
- ๐ Feedback on whether the guess is too high, too low, or correct.
- ๐ฅ๏ธ User-friendly interface built using the
pancurses
library.
Here is the structure of the Guess the Number Game project:
- ๐ .github/ISSUE_TEMPLATE: Contains templates for issue reporting.
- ๐ banner: Includes project banners and images (e.g., game banners).
- ๐ src: Source code of the project.
- ๐ .gitignore: Defines which files and directories should be ignored by Git.
- ๐ CODE_OF_CONDUCT.md: Code of conduct guidelines for contributors.
- ๐ Cargo.lock: Lock file for dependencies, automatically generated.
- ๐ Cargo.toml: Cargo configuration file containing project dependencies and settings.
- ๐ LICENSE: Custom license for the project detailing the conditions under which the software may be used, learned from, or modified.
- ๐ readme.md: The main README file with game instructions, setup, and information.
To run this project, you need:
- Rust and Cargo installed on your system.
- A 64-bit Windows system (for compatibility with this build).
If you don't have Rust and Cargo installed, follow these steps:
- Go to the Rust installation page.
- Follow the instructions to download and run the installer for your operating system.
- After installation, you can verify that Rust and Cargo are installed by running the following commands in your terminal:
rustc --version cargo --version
- Clone or download the project files to your local machine:
git clone https://github.com/kernferm/rust-guessing-game.git
- Navigate to the project directory:
cd rust-guessing-game
To build and run the game, use the following commands:
- Open a terminal and navigate to the project directory.
- Build the project using Cargo:
cargo build
- Run the game:
cargo run
- Once the game starts, follow the instructions on the screen.
- You have 7 attempts to guess the number between 0 and 100.
- After each guess, the program will tell you if your guess is too high, too low, or correct.
- You have the option to use up to 3 hints during the game to help narrow down the correct number.
This game was built and tested on:
- 64-bit Windows 10 using Rust and the
pancurses
library.
Contributions are welcome! If you'd like to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
Copyright (c) 2024 Bubbles The Dev & FNBUBBLES420 ORG
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use and learn from the Software, subject to the following conditions:
- Usage: The Software may be used for personal, educational, or non-commercial purposes only.
- Learning: Users are permitted to study the code to learn from it.
- Modifications: No modifications or derivative works of the Software are allowed without prior written consent from the original developer.
- Redistribution: The Software may not be redistributed, sold, or sublicensed in any form without express permission from the original developer.
- Commercial Use: The Software may not be used for commercial purposes without explicit written approval from the original developer.
- Any use of the Software that violates the terms of this license will result in revocation of permission to use, study, or learn from the Software.
- You are not permitted to remove or alter the copyright notice or this permission notice.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.