blob: fb794a245782a9841f5b4397d347f37c2adc1544 (
plain) (
blame)
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
|
package com.camilstaps.rushhour;
/**
* Created by camilstaps on 16-4-15.
*/
public class Coordinate {
private int x, y;
public Coordinate(int x, int y) {
this.x = x;
this.y = y;
}
public Coordinate(Coordinate c) {
this.x = c.x;
this.y = c.y;
}
public void move(int offsetX, int offsetY) {
this.x += offsetX;
this.y += offsetY;
}
public int getX() {
return x;
}
public int getY() {
return y;
}
}
|