implemented toString method

This commit is contained in:
Johannes Schmelz 2024-05-12 14:44:54 +02:00
parent a3161603e5
commit 1605bd921a
2 changed files with 30 additions and 2 deletions

Binary file not shown.

View File

@ -13,7 +13,35 @@ public enum Rank {
*/
@Override
public String toString() {
//TODO implement
return super.toString();
switch (this) {
case TWO:
return "2";
case THREE:
return "3";
case FOUR:
return "4";
case FIVE:
return "5";
case SIX:
return "6";
case SEVEN:
return "7";
case EIGHT:
return "8";
case NINE:
return "9";
case TEN:
return "10";
case JACK:
return "J";
case QUEEN:
return "Q";
case KING:
return "K";
case ACE:
return "A";
default:
return "";
}
}
}