Class FixedWildcard

Direct Known Subclasses:
Joker

public class FixedWildcard extends Wildcard
The "fixed" Wildcard, which has no dynamic behavior that depends on additional game state, and has a constant set of Cards it can convert to.
  • Constructor Details

    • FixedWildcard

      public FixedWildcard(Set<Card> conversions)
      Constructor for a fixed wildcard.
      Parameters:
      conversions - The set of Cards that this wildcard can convert to.
      Throws:
      IllegalCardException - If the given set of conversions is empty. This entirely defeats the purpose of making a wildcard.
  • Method Details

    • getConversions

      public final Set<Card> getConversions()
      Gets all the Cards that this wildcard can convert to. In this case, it is a trivial getter of conversions.
      Specified by:
      getConversions in class Wildcard
      Returns:
      The set of all cards that this wildcard can convert to.