Class GreedyOptimizeTurn

All Implemented Interfaces:
Serializable, Cloneable, Behaviour

public class GreedyOptimizeTurn extends IntelligentBehaviour
See Also:
  • Constructor Details

    • GreedyOptimizeTurn

      public GreedyOptimizeTurn(Heuristic heuristic)
  • Method Details

    • clone

      public GreedyOptimizeTurn clone()
      Description copied from interface: Behaviour
      Clones the behaviour, typically with its internal state.
      Specified by:
      clone in interface Behaviour
      Overrides:
      clone in class AbstractBehaviour
      Returns:
      A clone of the Behaviour instance.
    • getName

      public String getName()
      Description copied from interface: Behaviour
      Gets a name for the behaviour. This should correspond to how the decisions are being made, e.g., a "Human Behaviour" or an "AI Behaviour.
      Returns:
      A String description of the behaviour.
    • mulligan

      public List<Card> mulligan(GameContext context, Player player, List<Card> cards)
      Description copied from interface: Behaviour
      Use the provided context, player and first hand cards to determine which cards to discard during a mulligan phase.
      Specified by:
      mulligan in interface Behaviour
      Overrides:
      mulligan in class IntelligentBehaviour
      Parameters:
      context - The game context.
      player - The player who's mulliganing.
      cards - The cards in the player's first hand.
      Returns:
      The cards the player chose to discard.
    • requestAction

      public GameAction requestAction(GameContext context, Player player, List<GameAction> validActions)
      Description copied from interface: Behaviour
      Requests an action from the player.
      Parameters:
      context - The game context where the choice is being made.
      player - The player who is making the choice.
      validActions - The valid actions the player has to choose from.
      Returns:
      One of the validActions that correspond to the player's choice.