public static AStarBugMap New() { var map = new AStarBugMap(); map.ForEachHex <TerrainGridHex, AStarBugMap>(hex => hex.IfHasValueDo(h => h.SetCosts <TerrainGridHex>(c => map[c]))); map.ResetLandmarks(); return(map); }
public async static Task <AStarBugMap> NewAsync() { var map = new AStarBugMap(); map.ForEachHex <TerrainGridHex, AStarBugMap>(hex => hex.IfHasValueDo(h => h.SetCosts <TerrainGridHex>(c => map[c]))); await map.ResetLandmarksAsync(); return(map); }