protected void GetFirst() { if (First.Count != 0) { return; } GetLast(); First.AddRange(TraverseLast(Last, current => current.GetPrevPaths())); }
protected void GetLast(IEnumerable <ColorableClass> startFrom) { if (Equals(Last, startFrom)) { startFrom = new List <ColorableClass>(Last); } if (Last.Count != 0) { Last.Clear(); } Last.AddRange(TraverseLast(startFrom, current => current.GetNextPaths())); }