using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Xna.Framework; using C5; class PriorityQueueC5 { private readonly Astar astar = new Astar(); private IPriorityQueue queue = new IntervalHeap(); public void AddToQueue(List nodes) { foreach (PQEntry item in nodes) { PQEntry temp = new PQEntry { Key = item.Key, Coordinates = item.Coordinates }; queue.Add(temp); } } public void AddToQueue(int x, int y, int score) { PQEntry temp = new PQEntry { Key = score, Coordinates = new Vector2(x, y) }; queue.Add(temp); } public PQEntry DeleteMax() { return queue.DeleteMax(); } public void AddAll(List entryList) { queue.AddAll(entryList); } public int getCount() { return queue.Count(); } }