public ItemQuery QueryItems(ItemQueryCfg cfg) { var query = new ItemQuery(this, cfg, items); RegisterItemListener(query); return(query); }
public ItemQuery(Game game, ItemQueryCfg cfg, IEnumerable <TileItem> items) { this.game = game; this.cfg = cfg; this.unavailable = new HashSet <TileItem>(); this.queue = new SimplePriorityQueue <TileItem>(); foreach (var item in items) { ItemAdded(item); } }