-
Notifications
You must be signed in to change notification settings - Fork 0
/
Status.java
40 lines (34 loc) · 917 Bytes
/
Status.java
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
33
34
35
36
37
38
39
40
/****************************************
* OTHELLO
* A Board Game
*
* Gerald Brady & Patrick Bradshaw
* January 27, 2018
* CSIS 2410
*
****************************************/
import javax.swing.ImageIcon;
/**
* The Status Enumaration represents the 4 states that a square can have.
*
* @author Patrick Bradshaw & Gerald Brady
*
*/
public enum Status {
OPEN(new ImageIcon(Status.class.getResource("lib/blank.png"))),
BLACK(new ImageIcon(Status.class.getResource("lib/blackdisc.png"))),
WHITE(new ImageIcon(Status.class.getResource("lib/whitedisc.png"))),
LEGAL(new ImageIcon(Status.class.getResource("lib/legalmarker.png")));
ImageIcon statusImage;
private Status(ImageIcon statusImage) {
this.statusImage = statusImage;
}
/**
* The important method for getting the image of a particular state.
*
* @return
*/
public ImageIcon getStatusImage() {
return statusImage;
}
}