Package project.app.warzone.Model
Class Order
java.lang.Object
project.app.warzone.Model.Order
This class is used to prototye the orders for a player in the game.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute()This method executes the order and deploys the armies on the target country.This method is used to get territory for the particular orderintThis method is returns the number of armies mentioned in ordervoidsetL_numberOfArmies(int p_numArmies) This method is used to set armies for the particular ordervoidsetL_territory(Country p_territory) This method is user to set Country for the particular order
-
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
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
This method is used to get territory for the particular order- Returns:
- Territory
-
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.
-