Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
final class Card {
private Rank rank;
private Suit suit;
public Card(Rank rank, Suit suit) {
this.rank = rank;
this.suit = suit;
public boolean sameAs(Card anotherCard) {
return rank.sameAs(anotherCard.rank) &&
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment