|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Controller for a single game of Hangman.
Implementations should have a constructor which takes a single
arguments, a ISessionController object. This will be a reference
to the session controller which created this game;
needed because the controller has the method to display
status and results; the game must call that display method,
so it needs a reference to the session controller.
Method Summary | |
char |
askUserForGuess()
Asks the user to enter the next guessed character. |
java.lang.String |
getGuessedLetters()
Tells which letters have been guessed (whether right or wrong), compressed together into a string. |
int |
getNumGuessesRemaining()
Tells how many guess are remaining in the current game. |
int |
playGame(IHangmanWord w)
Fully plays one game. |
Method Detail |
public int playGame(IHangmanWord w)
w
- the word to be used for this game.
public char askUserForGuess()
public java.lang.String getGuessedLetters()
public int getNumGuessesRemaining()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |