ScaLingo lets you play the famous Lingo TV-show on the command line, programmed in Scala.
This program is a small toy-project to get a feeling of Scala. I have tried to incorporate some key aspects of the language, such as case matching, partially applied functions, reading in/output, using functions as first-class-citizens and the functional programming paradigm.
sbt, simply run
sbt run from the console to run.
If you see, during the game, a bunch of colored question marks, there is something wrong with the
UTF-8 setting of your terminal.
In that case, run:
JAVA_TOOL_OPTIONS='-Dfile.encoding=UTF8' sbt run
Welcome to ScaLingo! What language would you like to play? (E)nglish/(D)utch > english Playing in English What word-length would you like to play? (5, 6, 7) > 6 Word length is 6 Make a guess. The word so far is 'T.....' (guesses left: 5) > tumped ✓✗✗✗✗✗ Try again Make a guess. The word so far is 'T.....' (guesses left: 4) > troaks ✓✓✗O✗✓ Try again Make a guess. The word so far is 'TR...S' (guesses left: 3) > traces ✓✓✓✓✗✓ Try again Make a guess. The word so far is 'TRAC.S' (guesses left: 2) > tracts Congratulations, you guessed the correct word!
sbt test from the console to test the classes.