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