private static bool WithinClusterRange(ref List <Unit> cluster, HexCell h, int range) { foreach (Unit u in cluster) { if (HexCell.CubeDistance(h, u.CurrentHex) <= range) { return(true); } } return(false); }
// the cost heuristic, in this case, euclidian distance static public int Heuristic(HexCell a, HexCell b) { return(HexCell.CubeDistance(a, b)); //HexCell.LineDistance(a.transform.position, b.transform.position); }