Class ActionLogic
java.lang.Object
net.demilich.metastone.game.logic.ActionLogic
- All Implemented Interfaces:
- Serializable
This class turns game actions into a list of possible actions for the player.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetValidActions(GameContext context, Player player) Iterates through the cards and minions belonging to the player, and determines what actions are available.voidrollout(GameAction action, GameContext context, Player player, Collection<GameAction> actions) Rolls out actions.
- 
Constructor Details- 
ActionLogicpublic ActionLogic()
 
- 
- 
Method Details- 
getValidActionsIterates through the cards and minions belonging to the player, and determines what actions are available. This also takes into account the available mana, game rules, etc.- Parameters:
- context-
- player-
- Returns:
 
- 
rolloutpublic void rollout(GameAction action, GameContext context, Player player, Collection<GameAction> actions) Rolls out actions. For actions that havetargetRequirementvalues that aren'tTargetSelection.NONE, returning new actions whoseGameAction.getTargetReference()is a valid target.- Parameters:
- action-
- context-
- player-
- actions-
 
 
-