()
| 42 | @Override |
| 43 | public void loaded() { |
| 44 | |
| 45 | List<Triple<Box, Float, Number>> run = breadthFirst(both()).filter(x -> x.properties.has(auto)) |
| 46 | .filter(x -> !done.containsKey(x)) |
| 47 | .filter(x -> x.properties.getFloat(auto, 0) > 0) |
| 48 | .map(x -> new Triple<>(x, x.properties.get(Box.frame).y, x.properties.get(auto))) |
| 49 | .collect(Collectors.toList()); |
| 50 | |
| 51 | // mark everything as done right now, in case there are exceptions. |
| 52 | run.forEach(x -> done.put(x.first, System.currentTimeMillis())); |
| 53 | |
| 54 | Collections.sort(run, (a, b) -> { |
| 55 | if (a.third.doubleValue() > b.third.doubleValue()) return 1; |
| 56 | if (a.third.doubleValue() < b.third.doubleValue()) return -1; |
| 57 | |
| 58 | if (a.second.doubleValue() < b.second.doubleValue()) return 1; |
| 59 | if (a.second.doubleValue() > b.second.doubleValue()) return -1; |
| 60 | |
| 61 | return 0; |
| 62 | }); |
| 63 | |
| 64 | |
| 65 | if (run.size() > 0) { |
| 66 | System.out.println("\n\n\n gathered auto list is "); |
| 67 | run.forEach((t) -> { |
| 68 | System.out.println(" " + t); |
| 69 | }); |
| 70 | } |
| 71 | |
| 72 | |
| 73 | for (Triple<Box, Float, Number> t : run) { |
| 74 | |
| 75 | RunLoop.main.delayTicks(() -> { |
| 76 | t.first.find(Chorder.begin, both()) |
| 77 | .findFirst().map(x -> x.apply(t.first)); |
| 78 | |
| 79 | }, (1+t.third.intValue())); |
| 80 | |
| 81 | } |
| 82 | } |
| 83 | } |
no test coverage detected