public enum Suit {
HEARTS(CardColor.RED, "Hearts"), DIAMONDS(CardColor.RED, "Diamonds"),
SPADES(CardColor.BLACK, "Spades"), CLUBS(CardColor.BLACK, "Clubs");
private final CardColor color;
private final String text;
private Suit (CardColor c, String suitText) {
this.color = c;
this.text = suitText;
}
public CardColor getCardColor() {
return this.color;
}
public String getSuitAsText() {
return text;
}
} |