Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Small command-line application to play the famous TV-show "Lingo", programmed in Scala
Scala
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
resources
src
.gitignore
LICENSE
README.md
build.sbt

README.md

ScaLingo

ScaLingo lets you play the famous Lingo TV-show on the command line, programmed in Scala.

About

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.

Run

Using 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

Example play

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!

Test

Using sbt, run sbt test from the console to test the classes.

Something went wrong with that request. Please try again.