Class ConfigureMarketplaceTileAction
- java.lang.Object
-
- page.codeberg.terratactician_expandoria.bots.actions.Action
-
- page.codeberg.terratactician_expandoria.bots.actions.ConfigureMarketplaceTileAction
-
public class ConfigureMarketplaceTileAction extends Action
ConfigureMarket is action to change the trade ration of a market place.
-
-
Field Summary
Fields Modifier and Type Field Description CubeCoordinate
coord
Coordinate of the tile to be configured.double
food
percentage of food to sell: in [0.0, 1.0]double
materials
percentage of materials to sell: in [0.0, 1.0]
-
Constructor Summary
Constructors Constructor Description ConfigureMarketplaceTileAction​(CubeCoordinate coord, double food, double materials)
Generates an action that reconfigures a market place.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Name of the action in the json package.java.lang.Object
serializeData()
Serializes the data of the Action.
-
-
-
Field Detail
-
coord
public CubeCoordinate coord
Coordinate of the tile to be configured.
-
food
public double food
percentage of food to sell: in [0.0, 1.0]
-
materials
public double materials
percentage of materials to sell: in [0.0, 1.0]
-
-
Constructor Detail
-
ConfigureMarketplaceTileAction
public ConfigureMarketplaceTileAction​(CubeCoordinate coord, double food, double materials) throws java.lang.IllegalArgumentException
Generates an action that reconfigures a market place. The Arguments describe a percentage (values between 0 and 1) of the amount of resources in the influence of the marketplace.- Parameters:
coord
- Coordinate of the targeted Marketfood
- Percentage of food to sellmaterials
- Percentage of materials to sell- Throws:
java.lang.IllegalArgumentException
- will be thrown the limits from the other args are exceeded.
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from class:Action
Name of the action in the json package.
-
serializeData
public java.lang.Object serializeData()
Description copied from class:Action
Serializes the data of the Action. This may returns a JSONObject or String or an other supported datatype.- Specified by:
serializeData
in classAction
- Returns:
- JSONObject or String
-
-