public static int Distance(Cube a, Cube b) { return Length(Subtract(a, b)); }
public static int Length(Cube hex) { return (Math.Abs(hex.X) + Math.Abs(hex.Y) + Math.Abs(hex.Z)) / 2; }
public static Cube Add(Cube a, Cube b) { return new Cube(a.X + b.X, a.Y + b.Y, a.Z + b.Z); }
public static Cube Subtract(Cube a, Cube b) { return new Cube(a.X - b.X, a.Y - b.Y, a.Z - b.Z); }
public static Cube Neighbor(Cube hex, int direction) { return Add(hex, Direction(direction)); }