|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMenuHandler
public class MenuHandler
This class handles the I/O and the rendering of the menu
Constructor Summary | |
---|---|
MenuHandler()
|
Method Summary | |
---|---|
void |
beginGame()
This Method calls the method of the same name in the StrategoGame class |
void |
createAccount()
This Method prompts the user for an account name and attempts to insert it into the account log file, if it doesn't already exist. |
void |
exit()
This Method prompts the user asking if they want to end the game and if so it calls the method of the same name in the StrategoGame class |
void |
layoutMenu()
This Method lays out the menu graphically |
void |
logIn()
This Method prompts the user for an account name, then searches the account log file for the account, setting it as the active account if it is found returning a IOException if it is not found. |
void |
logOut()
This Method sets the active account to null |
void |
newGame()
This Method calls the method of the same name in the StrategoGame class |
void |
player1Win()
This Method increments player 1's wins, and player 2's losses |
void |
player2Win()
This Method increments player 2's wins, and player 1's losses |
void |
tie()
This Method increments both player's ties. |
void |
watchReplay()
This Method prompts the user for a replay file name,and calls the StrategoGame classes show replay file with that as an argument if it is found else, returning a FileNotFoundException if it is not found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MenuHandler()
Method Detail |
---|
public void layoutMenu()
public void createAccount()
public void logIn()
public void logOut()
public void newGame()
public void beginGame()
public void watchReplay()
public void exit()
public void player1Win()
public void player2Win()
public void tie()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |