refo/src/main/java/evironment/blackjack/cards/Card.java

26 lines
466 B
Java

package evironment.blackjack.cards;
public class Card {
private Suit suit;
private Rank rank;
public Card(Suit suit, Rank rank) {
this.suit = suit;
this.rank = rank;
}
public Suit getSuit() {
return suit;
}
public Rank getRank() {
return rank;
}
@Override
public boolean equals(Object o) {
return (o instanceof Card && ((Card) o).rank == rank && ((Card) o).suit == suit);
}
}