I'm implementing Dijkstra's on a board of tiles. I want to store all the tiles in a Priority Queue, sorted by their distance from the starting location. In Java, this would be something like:
Queue<Point> pq = new PriorityQueue<Point>(new Comparator() { /* sort by distance from start */ });
What would the equivalent by in C# XNA? C# has a PriorityQueue
class, but that only works for IComparable
objects, which Point
objects are not.