-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCard.java
More file actions
63 lines (56 loc) · 827 Bytes
/
Card.java
File metadata and controls
63 lines (56 loc) · 827 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import javax.swing.ImageIcon;
import javax.swing.JToggleButton;
public class Card {
int shape, color, fill, num;
private int[] cardId = new int[4];
private ImageIcon cardImage;
private JToggleButton cardBtn;
public Card(int s, int c, int f, int n, ImageIcon cImg)
{
shape = s;
color = c;
fill = f;
num = n;
cardId[0] = s;
cardId[1] = c;
cardId[2] = f;
cardId[3] = n;
cardImage = cImg;
}
public int[] getCardiD()
{
return cardId;
}
public ImageIcon getCard()
{
return cardImage;
}
public void setCard(ImageIcon img)
{
cardImage = img;
}
public int getShape()
{
return shape;
}
public int getColor()
{
return color;
}
public int getFill()
{
return fill;
}
public int getNumber()
{
return num;
}
public void setBtn(JToggleButton btn)
{
cardBtn = btn;
}
public JToggleButton getBtn()
{
return cardBtn;
}
}