public List<Double> getCosts() { final List<Double> result = new ArrayList<Double>(); for (Entry ent : all) { result.add(costComputer.getCost(ent.board)); } return result; }
public Entry(Board b, CostComputer costComputer) { this.board = b; if (costComputer != null) { this.cost = costComputer.getCost(b); } else { this.cost = 0; } }
public Board getAndSetExploredSmallest() { for (Entry ent : all) { if (ent.explored == false) { ent.explored = true; assert costComputer.getCost(ent.board) == ent.cost; // System.err.println("Peeking " + ent.cost); return ent.board; } } return null; }