public boolean isWithinSquare(Coordinate c, int d) {
return this.isWithinSquare(c, d, d, d);
}
public boolean isWithinSquare(Coordinate c, int dx, int dy, int dz) {
return Math.abs(c.xCoord-xCoord) <= dx && Math.abs(c.yCoord-yCoord) <= dy && Math.abs(c.zCoord-zCoord) <= dz;
<BUG>}
public int[] toArray() {</BUG>
int[] a = new int[3];
a[0] = xCoord;
a[1] = yCoord;

public boolean isWithinSquare(Coordinate c, int d) {
return this.isWithinSquare(c, d, d, d);
}
public boolean isWithinSquare(Coordinate c, int dx, int dy, int dz) {
return Math.abs(c.xCoord-xCoord) <= dx && Math.abs(c.yCoord-yCoord) <= dy && Math.abs(c.zCoord-zCoord) <= dz;
}
public int getTaxicabDistanceTo(Coordinate c) {
return Math.abs(c.xCoord-xCoord)+Math.abs(c.yCoord-yCoord)+Math.abs(c.zCoord-zCoord);
}
public int[] toArray() {
int[] a = new int[3];
a[0] = xCoord;
a[1] = yCoord;
