Interface IHangmanDictionary

All Known Implementing Classes:
HangmanDictionary

public interface IHangmanDictionary

A source of words for the game of Hangman.

Implementations of this interface should have a constructor with one string argument, where the string designates a file to be used as the source for words. If the file cannot be opened, the resulting dictionary object should behave as if it contained a small, fixed set of words (even a single word, for example).


Method Summary
 java.lang.String chooseWord()
          Choose a word suitable for the game.
 

Method Detail

chooseWord

public java.lang.String chooseWord()
Choose a word suitable for the game. This normally should be a word not previously chosen.

Returns:
the chosen word, or null if there are no suitable words available.