|
@ -3,10 +3,17 @@ package de.tims.fleetstorm.matchfield; |
|
|
public class Coordinate { |
|
|
public class Coordinate { |
|
|
private int x; |
|
|
private int x; |
|
|
private int y; |
|
|
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) { |
|
|
public Coordinate(int x, int y) { |
|
|
this.x = x; |
|
|
this.x = x; |
|
|
this.y = y; |
|
|
this.y = y; |
|
|
|
|
|
this.state = 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public Integer getX() { |
|
|
public Integer getX() { |
|
@ -17,4 +24,7 @@ public class Coordinate { |
|
|
return y; |
|
|
return y; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getState() { |
|
|
|
|
|
return this.state; |
|
|
|
|
|
} |
|
|
} |
|
|
} |