The classic number guessing game with a magical twist.
Who said that coding a number guessing game should be dull? Meet the Number Wizard, who will give you hot/cold feedback and maybe even a desperate hint!
The Number Wizard thinks of a number between 0 and 99. You have 10 attempts to find it!
Each guess earns a temperature rating based on how close you are.
- ๐ฅถ Freezing - Way off (50+ away)
- โ๏ธ Cold - Not close (21-50 away)
- ๐ Cool - Getting there (11-20 away)
- ๐ Warm - Close (6-10 away)
- ๐ฅต Hot - Very close (3-5 away)
- ๐ฅ Burning - Almost there (1-2 away)
- ๐ ON FIRE! - Perfect! You found it!
Your guess history is displayed in matching colours.
# Clone and run
git clone https://github.com/flloaers/number-wizard.git
cd number-wizard
cargo runrand = "0.9.3"- For random number generationcolored = "3.0.0"- For colourful terminal output
This project was built as a Rust learning project exploring:
Enumwith methodsStructorganisation andimplblocks- Error handling with
Result<T, E> - Pattern matching
- External crate integration (
randandcolored)
This is a learning project, so feedback is appreciated and contributions are welcome! Feel free to fork the repository, open an issue, or submit a pull request.
This repository is licensed under the MIT License.