Class ActionLogic

java.lang.Object
net.demilich.metastone.game.logic.ActionLogic
All Implemented Interfaces:
Serializable

public class ActionLogic extends Object implements Serializable
This class turns game actions into a list of possible actions for the player.
See Also:
  • Constructor Details

    • ActionLogic

      public ActionLogic()
  • Method Details

    • getValidActions

      public List<GameAction> getValidActions(GameContext context, Player player)
      Iterates 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:
    • rollout

      public void rollout(GameAction action, GameContext context, Player player, Collection<GameAction> actions)
      Rolls out actions. For actions that have targetRequirement values that aren't TargetSelection.NONE, returning new actions whose GameAction.getTargetReference() is a valid target.
      Parameters:
      action -
      context -
      player -
      actions -