Пример #1
0
 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));
 }
Пример #2
0
 public DeltaPointsPath(IMonster creature, Point currentPoint, DeltaPointsPath prevPoint = null)
 {
     Creature  = creature;
     Point     = currentPoint;
     PrevPoint = prevPoint;
 }
Пример #3
0
 public void Add(DeltaPointsPath p)
 {
     endPoints.Add(p);
 }