We will learn to use Spock with an example - Scramble game.

o The player is presented with a scrambled word (for example nhinfsi). 
  You can maintain a word list in a file if you like.
o The player can pick any letters from the scrambled word to make a word 
(notice some letters are repeated). 
o The word the player creates can have at most as many characters as the number of letters presented (but can be fewer).
o The word the user creates has to be valid (check the spelling).
o Each letter has a different weight (points) as shown below:
  1 point  each: A C D E I N O R S T
  2 points each: G H L
  3 points each: K W X
  4 points each: M U Y
  5 points each: P V Z
  8 points each: B F Q
  10 points    : J
o If the player uses all the letters to create a valid word, give the
 player 10 bonus points
o If the word created by the user is not valid (spelling error, then do 
  not given any points).
o If the word created by the user has letters not in the list, do not
  given any points.
o The user can repeat the game with a new word or exit at any time.

Here is an example of words selected by the user (from the given letters 
nhinfsi) and points given by the program:

Word    points
nis     0 (spelling error)
fan     0 (a not in the list of letters)
fin     10  (8 + 1 + 1)
fish    12  (8 + 1 + 1 + 2)
finnish 25  (8 + 1 + 1 + 1 + 1 + 1 + 2 + bonus)

Game ends after each selection (user is not given option to keep trying
more words for the same set of letters).                                    