|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectStrategoGame
public class StrategoGame
This class handles the rendering of the other frames, the passing of methods between MenuHandler, BoardManager, and GameplayLogManager, in other words it is a middle-man
Constructor Summary | |
---|---|
StrategoGame()
|
Method Summary | |
---|---|
void |
beginGame()
This Method first checks if a game is in progress, if so it checks if the gameState of the BoardManager is in place mode, and that redUnitsToPlace, and blueUnitsToPlace are empty, if so then it changes the game phase to play and calls the playGame() method in BoardManager |
void |
deityMode()
This Method calls the method of the same name in the BoardManager class |
void |
exit()
This Method first checks if a game is in progress, if so it asks the user if they want to forfeit, running the player2Win() method if they respond with a yes, and does nothing otherwise, if no game is in progress or if the player quit it, this method then exits the program. |
void |
killUnit()
This Method calls the method of the same name in the BoardManager class |
void |
LayoutGUI()
This Method lays out the main frame, positions the BoardManager, MenuHandler, and GameplayLogManager, and calls their GUI setup methods |
void |
newGame()
This Method first checks if a game is in progress, if so it asks the user if they want to forfeit, running the player2Win() method if they respond with a yes, and does nothing otherwise, if no game is in progress or if the player quit it, this method then calls the BoardManager newGame() method. |
void |
player1Win()
This Method calls the method of the same name in the GameplayLogManager class |
void |
player2Win()
This Method calls the method of the same name in the GameplayLogManager class |
void |
showReplay(java.io.File logFile)
This Method calls the loadLog(File) method in GameplayLogManager, passing the log file, it then repeats the actions of the log via appropriate method calls on the BoardManager |
void |
tie()
This Method calls the method of the same name in the GameplayLogManager class |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StrategoGame()
Method Detail |
---|
public void LayoutGUI()
public void showReplay(java.io.File logFile)
logFile
- The Log File for GameplayLogManager to loadpublic void newGame()
public void beginGame()
public void exit()
public void deityMode()
public void killUnit()
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 |