Class StartupMapEditing
java.lang.Object
org.bitsquad.warzone.gameengine.phase.Phase
org.bitsquad.warzone.gameengine.phase.StartupMapEditing
Startup Map Editing phase implementation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleAdvance(String p_countryNameFrom, String p_targetCountryName, int p_armyUnits) Handler method for advance commandvoidhandleAirlift(int p_sourceCountryId, int p_targetCountryId, int p_numArmies) Handler method for airlift commandvoidHandler method for assigncountries commandvoidhandleBlockade(int p_targetCountryId) Handler method for blockade commandvoidhandleBomb(int p_countryId) Handler method for bomb commandvoidHandler method for commit commandvoidhandleDeployArmy(int p_targetCountryId, int p_armyUnits) Handler method for deploy commandvoidhandleEditContinent(int[] p_addArray, int[] p_removeIds) Handler method for editcontinent commandvoidhandleEditCountry(int[] p_addIds, int[] p_removeIds) Handler method for editcountry commandvoidhandleEditMap(String p_filename) Handler method for editmap commandvoidhandleEditNeighbor(int[] p_addIds, int[] p_removeIds) Handler method for editneighbor commandvoidHandler method for execute ordersvoidhandleGamePlayer(String[] p_addNames, String[] p_removeNames) Handler method for gameplayer commandvoidhandleLoadMap(String p_filename) Handler method for loadmap commandvoidhandleNegotiate(int p_targetPlayerId) Handler method for negotiate commandvoidhandleSaveMap(String p_filename, boolean p_saveAsConquestMap) Handler method for savemap commandvoidHandler method for validatemap commandstatic booleanisConquestMap(String p_fileName) Checks if a map is a conquest map or notMethods inherited from class org.bitsquad.warzone.gameengine.phase.Phase
printInvalidCommandMessage
-
Constructor Details
-
StartupMapEditing
Parameterized constructor- Parameters:
p_gameEngine- GameEngine
-
-
Method Details
-
handleLoadMap
Handler method for loadmap command- Specified by:
handleLoadMapin classPhase- Parameters:
p_filename- String filename- Throws:
Exception
-
handleEditMap
Handler method for editmap command- Specified by:
handleEditMapin classPhase- Parameters:
p_filename- String filename- Throws:
IOException
-
handleSaveMap
Handler method for savemap command- Specified by:
handleSaveMapin classPhase- Parameters:
p_filename- String filename- Throws:
Exception
-
handleEditContinent
public void handleEditContinent(int[] p_addArray, int[] p_removeIds) Handler method for editcontinent command- Specified by:
handleEditContinentin classPhase- Parameters:
p_addArray- ids and values to addp_removeIds- ids to remove
-
handleEditCountry
public void handleEditCountry(int[] p_addIds, int[] p_removeIds) Handler method for editcountry command- Specified by:
handleEditCountryin classPhase- Parameters:
p_addIds- ids to addp_removeIds- ids to remove
-
handleEditNeighbor
public void handleEditNeighbor(int[] p_addIds, int[] p_removeIds) Handler method for editneighbor command- Specified by:
handleEditNeighborin classPhase- Parameters:
p_addIds-p_removeIds-
-
isConquestMap
Checks if a map is a conquest map or not- Parameters:
p_fileName- Filename- Returns:
- Throws:
IOException
-
handleValidateMap
public void handleValidateMap()Handler method for validatemap command- Specified by:
handleValidateMapin classPhase
-
handleGamePlayer
Handler method for gameplayer command- Specified by:
handleGamePlayerin classPhase- Parameters:
p_addNames- names to addp_removeNames- names to remove
-
handleAssignCountries
Handler method for assigncountries command- Specified by:
handleAssignCountriesin classPhase- Throws:
Exception
-
handleDeployArmy
public void handleDeployArmy(int p_targetCountryId, int p_armyUnits) Handler method for deploy command- Specified by:
handleDeployArmyin classPhase- Parameters:
p_targetCountryId- Target Country IDp_armyUnits- Number of army units
-
handleAdvance
Handler method for advance command- Specified by:
handleAdvancein classPhase- Parameters:
p_countryNameFrom- Source Country Namep_targetCountryName- Target Country Namep_armyUnits- Number of army units
-
handleBomb
public void handleBomb(int p_countryId) Handler method for bomb command- Specified by:
handleBombin classPhase- Parameters:
p_countryId- Country ID
-
handleBlockade
public void handleBlockade(int p_targetCountryId) Handler method for blockade command- Specified by:
handleBlockadein classPhase- Parameters:
p_targetCountryId- target Country ID
-
handleAirlift
public void handleAirlift(int p_sourceCountryId, int p_targetCountryId, int p_numArmies) Handler method for airlift command- Specified by:
handleAirliftin classPhase- Parameters:
p_sourceCountryId-p_targetCountryId-p_numArmies-
-
handleNegotiate
public void handleNegotiate(int p_targetPlayerId) Handler method for negotiate command- Specified by:
handleNegotiatein classPhase- Parameters:
p_targetPlayerId- Target Player ID
-
handleCommit
public void handleCommit()Handler method for commit command- Specified by:
handleCommitin classPhase
-
handleExecuteOrders
public void handleExecuteOrders()Handler method for execute orders- Specified by:
handleExecuteOrdersin classPhase
-