-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPoint.java
More file actions
59 lines (53 loc) · 1.12 KB
/
Point.java
File metadata and controls
59 lines (53 loc) · 1.12 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
57
58
59
/**
*
*/
package ca.bcit.comp2526.a2a;
/**
* Class containing instance variables of
* cell coordinates, obtainable via
* getter and setter methods.
* @author Kevin Oane
* @version 1.0.
*
*/
public class Point {
private int x;
private int y;
/**
* Receives coordinates of a cell.
* @param x
* x-coordinate.
* @param y
* y-coordinate.
*/
public Point(int x, int y) {
this.x = x;
this.y = y;
}
/**
* Receives and sets cell coordinates
* relative to the cell 2d array and world.
* @param x
* @param y
*/
public void setPoint(int x, int y) {
this.x = x;
this.y = y;
}
/**
* Getter method returning x-coordinate.
* @return x
* x-coordinate
*/
public int getXPoint() {
return this.x;
}
/**
* Getter method returning y-coordinate.
* @return y
* y-coordinate
*/
public int getYPoint() {
return this.y;
}
}