Ejemplo n.º 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));
 }
Ejemplo n.º 2
0
 public DeltaPointsPath(IMonster creature, Point currentPoint, DeltaPointsPath prevPoint = null)
 {
     Creature  = creature;
     Point     = currentPoint;
     PrevPoint = prevPoint;
 }
Ejemplo n.º 3
0
 public void Add(DeltaPointsPath p)
 {
     endPoints.Add(p);
 }