Practical exam for FP
The task is getting a random string from a line in a file, scramble it randomly leaving the first and last letter from a word unchanged (so from scramble, you may get sbmcrlae, and from scra mble, you may get sbca mlre because changing letters from different words is valid).
The command from the user looks like: swap word1 letter1 - word2 letter2.
Score is calculated from the random selected word from taking the number of total characters minus the spaces.
Undo works for only one operation and leaves the score unchanged.
Game ends when the score is 0, the player loses, or players gets the original word right, player wins and score is printed.