Skip to content

flloaers/number-wizard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง™ The Number Wizard

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!

๐ŸŽฎ How to Play

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.

Temperature Scale:

  • ๐Ÿฅถ 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.

๐Ÿš€ Quick Start

# Clone and run 
git clone https://github.com/flloaers/number-wizard.git
cd number-wizard 
cargo run

๐Ÿ“ฆ Dependencies

  • rand = "0.9.3" - For random number generation
  • colored = "3.0.0" - For colourful terminal output

๐Ÿ“– Concepts Explored

This project was built as a Rust learning project exploring:

  • Enum with methods
  • Struct organisation and impl blocks
  • Error handling with Result<T, E>
  • Pattern matching
  • External crate integration (rand and colored)

๐Ÿค Contributing

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.

๐Ÿ“œ License

This repository is licensed under the MIT License.

About

The classic number guessing game in Rust... with a magical flavour.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages