-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSymbol.java
More file actions
56 lines (46 loc) · 1.13 KB
/
Symbol.java
File metadata and controls
56 lines (46 loc) · 1.13 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import javafx.scene.image.Image;
/**
* Created by ADMIN on 06-Nov-17.
*/
public class Symbol implements ISymbol {
// the private intance variables
private Image image;
private int value;
// the default constructor to set the values
public Symbol(Image image, int v) {
this.image = image;
this.value = v;
}
public Symbol() {
}
// this is the comparator that checks the wins and losses
public static String winStatus(int num, int num1, int num2) {
String Status;
if (num == num1) {
return Status = "Won";
} else if (num1 == num2) {
return Status = "Won";
} else if (num == num2) {
return Status = "Won";
} else {
return Status = "lose";
}
}
// the getter and setter methods
@Override
public void SetImage(Image image) {
this.image = image;
}
@Override
public Image GetImage() {
return this.image;
}
@Override
public void SetValue(int v) {
this.value = v;
}
@Override
public int GetValue() {
return this.value;
}
}