public class Card
extends java.lang.Object
Constructor and Description |
---|
Card(int assocCode,
int symbol) |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsASet(Card[] cards)
A test of whether the array of cards contains at least one cashable set.
|
boolean |
equals(java.lang.Object other)
The way this method is implemented all wildcards are equal to each other!!!
|
static Card[] |
getBestSet(Card[] cards,
int player,
Country[] countries)
This returns a size-3 Card array, containing a set from amongst the given array that uses as many cards owned by player as possible.
|
int |
getCode()
Returns the country code associated with this card.
|
static Card[] |
getRandomSet(Card[] cards)
This returns a size-3 Card array, containing a random set from amongst the given array.
|
int |
getSymbol()
Returns the symbol on the card.
|
static boolean |
isASet(Card card1,
Card card2,
Card card3)
A test of whether these three cards are a cashable set.
|
java.lang.String |
toString()
Gives a String representation of the card.
|
public static boolean containsASet(Card[] cards)
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public static Card[] getBestSet(Card[] cards, int player, Country[] countries)
public int getCode()
public static Card[] getRandomSet(Card[] cards)
public int getSymbol()
public static boolean isASet(Card card1, Card card2, Card card3)
public java.lang.String toString()
toString
in class java.lang.Object