Description
This code always returns the latest target, instead of the best target (with the largest score)
// The target with largest score wins.. if( !targetScores.isEmpty() ) { Target bestTarget = null; int bestScore=0; for (Map.Entry<Target, Score> entry : targetScores.entrySet()) { if( entry.getValue().value > bestScore ) { bestTarget = entry.getKey(); } } return bestTarget; }
Attachments
Issue Links
- links to