diff options
| author | Camil Staps | 2015-04-16 18:23:27 +0200 | 
|---|---|---|
| committer | Camil Staps | 2015-04-16 18:23:27 +0200 | 
| commit | 8b2061b85722163de3b9e5f47534d7869b16239e (patch) | |
| tree | c82d3bf97ed95ec4e8719146bd6dfaed3d1da8f6 /app/src/main/java/com/camilstaps/rushhour/Coordinate.java | |
Initial commit
Diffstat (limited to 'app/src/main/java/com/camilstaps/rushhour/Coordinate.java')
| -rw-r--r-- | app/src/main/java/com/camilstaps/rushhour/Coordinate.java | 33 | 
1 files changed, 33 insertions, 0 deletions
diff --git a/app/src/main/java/com/camilstaps/rushhour/Coordinate.java b/app/src/main/java/com/camilstaps/rushhour/Coordinate.java new file mode 100644 index 0000000..fb794a2 --- /dev/null +++ b/app/src/main/java/com/camilstaps/rushhour/Coordinate.java @@ -0,0 +1,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; +    } + +}  | 
