private static void AddNewPointsToQueue(Point newPoint, Dictionary <IMonster, HashSet <Point> > visited, DeltaPointsPath pointWithPath, Queue <DeltaPointsPath> queue) { if (!Game.InBounds(newPoint) || Game.Map[newPoint.Y, newPoint.X] != State.Empty) { return; } visited[pointWithPath.Creature].Add(newPoint); queue.Enqueue(new DeltaPointsPath(pointWithPath.Creature, newPoint, pointWithPath)); }
public DeltaPointsPath(IMonster creature, Point currentPoint, DeltaPointsPath prevPoint = null) { Creature = creature; Point = currentPoint; PrevPoint = prevPoint; }
public void Add(DeltaPointsPath p) { endPoints.Add(p); }