|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HangmanUI
HangmanUI is a Java Interface that describes the behavior of a user interface for the solitaire Hangman game. The user interface allows the player to guess letters and displays the correctly guessed letters.
| Method Summary | |
|---|---|
void |
playAgain()
Handle end of game, asking if the player wants another game If yes, start a new game, otherwise exit. |
void |
setControl(Controller control)
Set reference to the controller that handles our input. |
void |
setVisible(boolean visible)
Start the display. |
void |
showLose(java.lang.String message)
Display that the player lost the game. |
void |
showWin()
Display that the player won the game. |
void |
update(java.util.Observable obs,
java.lang.Object obj)
Update the ui when notified by the game. |
| Method Detail |
|---|
void setControl(Controller control)
control - reference to the Controller who responds to actions on this UIvoid setVisible(boolean visible)
visible - true to turn on visibility, false to hide.
void update(java.util.Observable obs,
java.lang.Object obj)
update in interface java.util.Observerobs - which observable notified usobj - an object passed from the observablevoid showWin()
void showLose(java.lang.String message)
message - the correct solution to the puzzlevoid playAgain()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||