A simple command-line number guessing game written in Rust. This project demonstrates core Rust concepts such as user input handling, control flow, pattern matching, and random number generation.
The program generates a random number between 1 and 100, and the user attempts to guess it. After each guess, the program provides feedback:
- 📉 Too small
- 📈 Too big
- 🎉 Correct guess (win)
The game continues in a loop until the correct number is guessed.
- Random number generation using the
randcrate - Robust input handling and validation
- Continuous game loop until the correct guess
- Clear user feedback using pattern matching
- Rust (stable)
randcrate
cargo run- Input handling (
stdin) - Error handling with
match - Pattern matching
- Loops and control flow
- Random number generation
- Basic function decomposition (clean architecture)
- Add attempt counter
- Add difficulty levels
- Add timer or scoring system
- Convert to a GUI or web app
Ikwuka Okoye Aspiring Cybersecurity Analyst & Rust Software Engineer
This project is part of my Rust learning journey and showcases foundational programming concepts in a clean and professional way.