public int GetDistance(CubicPosition otherPos) { return((Math.Abs(x - otherPos.x) + Math.Abs(y - otherPos.y) + Math.Abs(z - otherPos.z)) / 2); }
public Position(CubicPosition pos) { this.x = x + (pos.z - (pos.z & 1)) / 2; this.y = pos.z; }