Package me.ramendev.expokert
Class Wildcard
java.lang.Object
me.ramendev.expokert.Card
me.ramendev.expokert.Wildcard
- Direct Known Subclasses:
FixedWildcard
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class me.ramendev.expokert.Card
getAllCards, toString
-
Constructor Details
-
Wildcard
public Wildcard()
-
-
Method Details
-
canBe
Checks whether this wildcard "can be" another card, in this case, whether it can be converted to the givenCard.- Parameters:
card- The card to check against.- Returns:
- Whether this wildcard "can be" another card.
-
getConversions
Gets all theCardthat this wildcard can convert to. This is implementation- specific, to different kinds of wildcards in different games.- Returns:
- The set of all cards that this wildcard can convert to.
- Implementation Note:
- Rationale for this class and this method being abstract: this wildcard should implement the logic to get the conversions by storing additional game state (done by the subclasses), and THEN return the cards it can convert to in a dynamic manner.
-