Class StrategoGame

java.lang.Object
  extended by StrategoGame

public class StrategoGame
extends java.lang.Object

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

StrategoGame

public StrategoGame()
Method Detail

LayoutGUI

public void LayoutGUI()
This Method lays out the main frame, positions the BoardManager, MenuHandler, and GameplayLogManager, and calls their GUI setup methods


showReplay

public 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

Parameters:
logFile - The Log File for GameplayLogManager to load

newGame

public 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.


beginGame

public 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


exit

public 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.


deityMode

public void deityMode()
This Method calls the method of the same name in the BoardManager class


killUnit

public void killUnit()
This Method calls the method of the same name in the BoardManager class


player1Win

public void player1Win()
This Method calls the method of the same name in the GameplayLogManager class


player2Win

public void player2Win()
This Method calls the method of the same name in the GameplayLogManager class


tie

public void tie()
This Method calls the method of the same name in the GameplayLogManager class