Skip to content
Snippets Groups Projects
Commit 725366c8 authored by iliya's avatar iliya
Browse files

feat: implemented compareTo in the respective enums

parent 212437eb
No related branches found
No related tags found
No related merge requests found
......@@ -12,4 +12,9 @@ public enum ColourSuit implements ISuit {
case CLUB -> "Trèfle";
};
}
@Override
public int compareTo(ISuit suit) {
return this.ordinal() - ((ColourSuit) suit).ordinal();
}
}
......@@ -12,4 +12,9 @@ public enum SpecialSuit implements ISuit {
case KNIGHT -> "Cavalier";
};
}
@Override
public int compareTo(ISuit suit) {
return this.ordinal() - ((SpecialSuit) suit).ordinal();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment