Navigation Menu

Skip to content

dnagir/rust_guessing_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guess Game from the Rust Book, with tests

Running

Provided you have Rust installed:

cargo test
cargo run

Example output:

   Compiling guessing_game v0.1.0 (file:///Users/you/code/rust_guessing_game)
    Finished debug [unoptimized + debuginfo] target(s) in 0.40 secs
     Running `target/debug/guessing_game`
Guess a number
500
Try smaller
250
Try smaller
125
Try bigger
170
Try smaller
145
Try bigger
nay
(didn't look like a number dude, try again)
160
Try smaller
153
Try bigger
156
Guessed with 8 attempts. Can you beat it?

About

Playing with the Rust Book

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages