public IEnumerable<Direction> GetPathReverse(AStarNode lastNode) { if (lastNode == null) yield break; AStarNode n = lastNode; while (n.Parent != null) { yield return (n.Parent.Loc - n.Loc).ToDirection(); n = n.Parent; } }