|
|
@ -3,10 +3,17 @@ package de.tims.fleetstorm.matchfield; |
|
|
|
public class Coordinate { |
|
|
|
private int x; |
|
|
|
private int y; |
|
|
|
private int state; |
|
|
|
|
|
|
|
public static final int EMPTY = 0; |
|
|
|
public static final int SHIP = 1; |
|
|
|
public static final int SHOT = 2; |
|
|
|
public static final int HIT = 3; |
|
|
|
|
|
|
|
public Coordinate(int x, int y) { |
|
|
|
this.x = x; |
|
|
|
this.y = y; |
|
|
|
this.state = 0; |
|
|
|
} |
|
|
|
|
|
|
|
public Integer getX() { |
|
|
@ -17,4 +24,7 @@ public class Coordinate { |
|
|
|
return y; |
|
|
|
} |
|
|
|
|
|
|
|
public int getState() { |
|
|
|
return this.state; |
|
|
|
} |
|
|
|
} |