Class StartupMapEditing

java.lang.Object
org.bitsquad.warzone.gameengine.phase.Phase
org.bitsquad.warzone.gameengine.phase.StartupMapEditing

public class StartupMapEditing extends Phase
Startup Map Editing phase implementation
  • Constructor Details

    • StartupMapEditing

      public StartupMapEditing(GameEngine p_gameEngine)
      Parameterized constructor
      Parameters:
      p_gameEngine - GameEngine
  • Method Details

    • handleLoadMap

      public void handleLoadMap(String p_filename) throws Exception
      Handler method for loadmap command
      Specified by:
      handleLoadMap in class Phase
      Parameters:
      p_filename - String filename
      Throws:
      Exception
    • handleEditMap

      public void handleEditMap(String p_filename) throws IOException
      Handler method for editmap command
      Specified by:
      handleEditMap in class Phase
      Parameters:
      p_filename - String filename
      Throws:
      IOException
    • handleSaveMap

      public void handleSaveMap(String p_filename, boolean p_saveAsConquestMap) throws Exception
      Handler method for savemap command
      Specified by:
      handleSaveMap in class Phase
      Parameters:
      p_filename - String filename
      Throws:
      Exception
    • handleEditContinent

      public void handleEditContinent(int[] p_addArray, int[] p_removeIds)
      Handler method for editcontinent command
      Specified by:
      handleEditContinent in class Phase
      Parameters:
      p_addArray - ids and values to add
      p_removeIds - ids to remove
    • handleEditCountry

      public void handleEditCountry(int[] p_addIds, int[] p_removeIds)
      Handler method for editcountry command
      Specified by:
      handleEditCountry in class Phase
      Parameters:
      p_addIds - ids to add
      p_removeIds - ids to remove
    • handleEditNeighbor

      public void handleEditNeighbor(int[] p_addIds, int[] p_removeIds)
      Handler method for editneighbor command
      Specified by:
      handleEditNeighbor in class Phase
      Parameters:
      p_addIds -
      p_removeIds -
    • isConquestMap

      public static boolean isConquestMap(String p_fileName) throws IOException
      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:
      handleValidateMap in class Phase
    • handleGamePlayer

      public void handleGamePlayer(String[] p_addNames, String[] p_removeNames)
      Handler method for gameplayer command
      Specified by:
      handleGamePlayer in class Phase
      Parameters:
      p_addNames - names to add
      p_removeNames - names to remove
    • handleAssignCountries

      public void handleAssignCountries() throws Exception
      Handler method for assigncountries command
      Specified by:
      handleAssignCountries in class Phase
      Throws:
      Exception
    • handleDeployArmy

      public void handleDeployArmy(int p_targetCountryId, int p_armyUnits)
      Handler method for deploy command
      Specified by:
      handleDeployArmy in class Phase
      Parameters:
      p_targetCountryId - Target Country ID
      p_armyUnits - Number of army units
    • handleAdvance

      public void handleAdvance(String p_countryNameFrom, String p_targetCountryName, int p_armyUnits)
      Handler method for advance command
      Specified by:
      handleAdvance in class Phase
      Parameters:
      p_countryNameFrom - Source Country Name
      p_targetCountryName - Target Country Name
      p_armyUnits - Number of army units
    • handleBomb

      public void handleBomb(int p_countryId)
      Handler method for bomb command
      Specified by:
      handleBomb in class Phase
      Parameters:
      p_countryId - Country ID
    • handleBlockade

      public void handleBlockade(int p_targetCountryId)
      Handler method for blockade command
      Specified by:
      handleBlockade in class Phase
      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:
      handleAirlift in class Phase
      Parameters:
      p_sourceCountryId -
      p_targetCountryId -
      p_numArmies -
    • handleNegotiate

      public void handleNegotiate(int p_targetPlayerId)
      Handler method for negotiate command
      Specified by:
      handleNegotiate in class Phase
      Parameters:
      p_targetPlayerId - Target Player ID
    • handleCommit

      public void handleCommit()
      Handler method for commit command
      Specified by:
      handleCommit in class Phase
    • handleExecuteOrders

      public void handleExecuteOrders()
      Handler method for execute orders
      Specified by:
      handleExecuteOrders in class Phase