-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPosition.java
More file actions
47 lines (36 loc) · 853 Bytes
/
Position.java
File metadata and controls
47 lines (36 loc) · 853 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
public class Position {
private String word;
private Coordinate from;
private Coordinate to;
public Position(String word, Coordinate from) {
this.word = word;
this.from = from;
}
public Position(String word, Coordinate from, Coordinate to) {
this.word = word;
this.from = from;
this.to = to;
}
@Override
public String toString() {
return "\n" + word + ": (" + from.getRow() + "," + from.getCol() + ") to (" + to.getRow() + "," + to.getCol() + ")";
}
public String getWord() {
return word;
}
public void setWord(String word) {
this.word = word;
}
public Coordinate getFrom() {
return from;
}
public void setFrom(Coordinate from) {
this.from = from;
}
public Coordinate getTo() {
return to;
}
public void setTo(Coordinate to) {
this.to = to;
}
}