-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSuit.java
More file actions
32 lines (26 loc) · 764 Bytes
/
Suit.java
File metadata and controls
32 lines (26 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
This Suit enum class acts as an environment file and contains properties of all
possible Suits in a deck of card.
Each Suit property is assigned two values:
suitCode - uniquely identifies the Suit.
suitInput - used to compare with the Suit input of each card in the main
argument.
*/
public enum Suit {
CLUBS(1,"C"),
DIAMONDS(2,"D"),
HEARTS(3,"H"),
SPADES(4,"S");
private final int suitCode;
private final String suitInput;
Suit(int suitCode,String suitInput){
this.suitCode = suitCode;
this.suitInput = suitInput;
}
public int getSuitCode() {
return suitCode;
}
public String getSuitInput() {
return suitInput;
}
}