Closed tripleabuilderbot closed 2 weeks ago
So this indicates the comparator is not transitive.
I think the error might be this line:
if (territories1.isEmpty()) {
return 0;
}
Since we're returning 0 in this case, we should do the same when territories2 is empty.
EDIT: Actually, that's not it, because at that point, both lists would have the same size...
Other thoughts:
If calculateAttackEfficiency() can return NaN, then return (attackEfficiency1 < attackEfficiency2) ? 1 : -1;
may not be transitive.
Other things I thought of is if some of the calculations called wouldn't always be consistent, but it's not clear to me that's the case...
Would be very helpful to have a repro.
Map
a_song_of_ice_and_fire / A Song of Ice and Fire
Log Message
Comparison method violates its general contract!
TripleA Version
2.6.14752
Java Version
11.0.19
Operating System
Windows 11
Heap Size
8138M
Stack Trace