-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode.java
More file actions
55 lines (45 loc) · 859 Bytes
/
Copy pathNode.java
File metadata and controls
55 lines (45 loc) · 859 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
/**
* Move
*
* @author Faiza Salami, 7941056
* <p>
* REMARKS: A node containing a piece and its location
*/
public class Node {
//Fields
private Piece piece;
private int row;
private int col;
private Node next;
//Constructors
public Node(Piece piece, int row, int col) {
this.piece = piece;
this.row = row;
this.col = col;
next = null;
}
//
//Accessors
//
public Node getNext() {
return next;
}
public Piece getPiece() {
return piece;
}
public int getRow() {
return row;
}
public int getCol() {
return col;
}
public void setNext(Node data) {
next = data;
}
public void setRow(int row) {
this.row = row;
}
public void setCol(int col) {
this.col = col;
}
}