-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpot.java
More file actions
58 lines (51 loc) · 946 Bytes
/
Copy pathSpot.java
File metadata and controls
58 lines (51 loc) · 946 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
/**
* Spot.java
*
* @author Deep Patel
*
* REMARKS: This class is used to store information about each tile on the
* board like which piece is on it and the number it is
*/
public class Spot {
//Instance variables
private Piece piece;
private int x;
private int y;
//Constructor
public Spot(int x, int y, Piece piece)
{
this.setPiece(piece);
this.setX(x);
this.setY(y);
}
//Get piece
public Piece getPiece()
{
return this.piece;
}
//Set piece
public void setPiece(Piece p)
{
this.piece = p;
}
//Get row
public int getX()
{
return this.x;
}
//Set row
public void setX(int x)
{
this.x = x;
}
//Get col
public int getY()
{
return this.y;
}
//Set col
public void setY(int y)
{
this.y = y;
}
}