I decided to code up a simple number-guessing scenario in Rust to to learn.
- Setup: The computer randomly picks a secret number between 0 and 5000.
- Guessing Game: The computer takes a shot at guessing the secret number and adjusts its strategy based on feedback.
- Repeat: The game loops until the computer cracks the code.
- Randomness with
rand
: Used therand
crate for a bit of unpredictability. - Keeping Track: The computer counts its guesses and notes how long the game takes.
- Keeps track of the highest and lowest guess and uses that to get closser to the target.
- Clone this repository.
- Ensure Rust is installed.
- Run
cargo run
Enjoy the game! ๐ป