public StarTile(string id, Territory territory) { Id = id; Territory = territory; Parent = null; HValue = 0; GValue = 0; FValue = 0; }
private void CalculateHeuristic(StarTile tile, Territory start, Territory finish, Dictionary<string,int> sldMap) { if (tile.Parent != null) { tile.GValue = tile.Parent.GValue + 1; tile.HValue = sldMap[tile.Id]; tile.FValue = tile.GValue + tile.HValue; } }
private List<string> ConstructPath(StarTile start) { StarTile current = start; List<string> path = new List<string>(); do { path.Add(current.Id); current = current.Parent; } while (current != null); return path; }
private List<StarTile> GetFrontier(StarTile current) { throw new NotImplementedException(); }