A cool little command line guessing game built in Rust!
You can find the book online here, and specificaly the guessing game chapter here!
Note: These are currently just ideas...
Here are some ideas for features we could add that build on the final source code in the book and make the guessing game even more awesome!
[ ] - Display the number of guesses it took the user to get to the correct number.
[ ] - Display a "high score / personal best" number of guesses it took the user to get to the correct number.
[ ] - Display cool ansi art when the user guesses the wining number!
[ ] - If the program says lower and the user enters a higher number, print a funny message indicating higher than the higher of the two numbers.
[ ] - Allow the user to change the range by passing an arugment with cargo run
(and use 100 as the default)
In order to run this code you just need to have cargo installed.
To check if you have cargo installed:
cargo -v
Then run the below commands inside the guessing_game
directory:
cargo run
This project in the guessing_game
directory was initially created with cargo:
cargo new guessing_game