Пример #1
0
 public StarTile(string id, Territory territory)
 {
     Id = id;
     Territory = territory;
     Parent = null;
     HValue = 0;
     GValue = 0;
     FValue = 0;
 }
Пример #2
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;
     }
 }
Пример #3
0
        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;
        }
Пример #4
0
 private List<StarTile> GetFrontier(StarTile current)
 {
     throw new NotImplementedException();
 }