Class Action
- java.lang.Object
-
- page.codeberg.terratactician_expandoria.bots.actions.Action
-
- Direct Known Subclasses:
CollectRewardAction
,ConfigureChameleonTileAction
,ConfigureMarketplaceTileAction
,ConfigureRgbTileAction
,GetTileStatusAction
,PlaceAction
,RedrawAction
,RegisterEventAction
,TakeAction
,UnRegisterAllEventsAction
,UnRegisterEventAction
public abstract class Action extends java.lang.Object
An Action is Package Send from bot to the game. An Action will modify the game in some way. A common action is used play the game like a human player would do. In challenge Mode this actions are abstracted away.
-
-
Constructor Summary
Constructors Constructor Description Action()
Empty default constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.String
getName()
Name of the action in the json package.org.json.JSONObject
serialize()
Serialize a sendable Action package.abstract java.lang.Object
serializeData()
Serializes the data of the Action.
-
-
-
Method Detail
-
getName
public abstract java.lang.String getName()
Name of the action in the json package.- Returns:
- API name of this Action
-
serializeData
public abstract java.lang.Object serializeData()
Serializes the data of the Action. This may returns a JSONObject or String or an other supported datatype.- Returns:
- JSONObject or String
-
serialize
public final org.json.JSONObject serialize()
Serialize a sendable Action package.- Returns:
- JSONObject
-
-