Class Order

java.lang.Object
project.app.warzone.Model.Order

public class Order extends Object
This class is used to prototye the orders for a player in the game.
  • Constructor Details

    • Order

      public Order()
  • Method Details

    • setL_numberOfArmies

      public void setL_numberOfArmies(int p_numArmies)
      This method is used to set armies for the particular order
      Parameters:
      p_numArmies - storing numberofArmies to set
    • setL_territory

      public void setL_territory(Country p_territory)
      This method is user to set Country for the particular order
      Parameters:
      p_territory - storing territory to set
    • getL_numberOfArmies

      public int getL_numberOfArmies()
      This method is returns the number of armies mentioned in order
      Returns:
      int
    • getL_Country

      public Country getL_Country()
      This method is used to get territory for the particular order
      Returns:
      Territory
    • execute

      public String execute()
      This method executes the order and deploys the armies on the target country.
      Returns:
      A string containing whether the order was successfully executed or not.