This is an example application for the case study at the end of my book Scala from Scratch: Exploration.
It's a command-line number guessing game, and it's heavily inspired by the Rust guessing game tutorial that starts the freely available book The Rust Programming Language by Steve Klabnik, Carol Nichols, and other people — one of the best learning resources available for Rust or any programming language.