public PathGraph GenerateMap() { _pointToNode.Clear(); _gold.Clear(); MarkerTheBoard(); FindLinks(); var graph = new PathGraph(); foreach (var node in _pointToNode.Values) { graph.Nodes.Add(node); } var test = _board.GetMyPosition(); return(graph); }
private PathGraph GetPathFromTarget(ref PathNode target) { if (target.Source == null) { return(null); } var graph = new PathGraph(); graph.Nodes.Add(target); var node = new PathNode(); node = target.Source; do { graph.Nodes.Add(node); node = node.Source; } while (node != null); return(graph); }