Enums for Suits/Faces
parent
5df7836de4
commit
f95103221a
@ -0,0 +1,15 @@
|
||||
public enum Faces {
|
||||
ACE(1), TWO(2), THREE(3), FOUR(4), FIVE(5), SIX(6), SEVEN(7), EIGHT(8), NINE(9), TEN(10), JACK(11), QUEEN(12),
|
||||
KING(13);
|
||||
|
||||
private int face;
|
||||
|
||||
Faces(int face) {
|
||||
this.face = face;
|
||||
}
|
||||
|
||||
public int getFace() {
|
||||
return face;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
public enum Suits {
|
||||
SPADES("Spades"), HEARTS("Hearts"), DIAMONDS("Diamonds"), CLUBS("Clubs");
|
||||
|
||||
private String suit;
|
||||
|
||||
Suits(String suit) {
|
||||
this.suit = suit;
|
||||
}
|
||||
|
||||
public String getSuit() {
|
||||
return suit;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue