Esempio n. 1
0
 /// <summary>
 /// Distance to another <see cref="HexCoord"/>.
 /// </summary>
 /// <param name="other">The other coordinates.</param>
 /// <returns></returns>
 public int DistanceTo(HexCoord other)
 {
     return((Math.Abs(x - other.x) + Math.Abs(y - other.y) + Math.Abs(z - other.z)) / 2);
 }
Esempio n. 2
0
 public static int DistanceBetween(HexCoord a, HexCoord b)
 {
     return(a.DistanceTo(b));
 }
Esempio n. 3
0
 public HexColor(int x, int y, Color color)
 {
     Coord  = new HexCoord(x, y);
     _color = Color;
 }