mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Improved last fixed for BoosterDraftAI.
This commit is contained in:
@@ -98,11 +98,12 @@ public class BoosterDraftAI {
|
|||||||
final List<PaperCard> possiblePick = new ArrayList<PaperCard>();
|
final List<PaperCard> possiblePick = new ArrayList<PaperCard>();
|
||||||
for(Pair<PaperCard, Double> p : rankedCards) {
|
for(Pair<PaperCard, Double> p : rankedCards) {
|
||||||
double rating = p.getValue();
|
double rating = p.getValue();
|
||||||
if( rating <= bestRanking + .01 ) {
|
if(rating <= bestRanking + .01) {
|
||||||
if (rating <= bestRanking) {
|
if (rating < bestRanking) {
|
||||||
|
// found a better card start a new list
|
||||||
possiblePick.clear();
|
possiblePick.clear();
|
||||||
}
|
|
||||||
bestRanking = rating;
|
bestRanking = rating;
|
||||||
|
}
|
||||||
possiblePick.add(p.getKey());
|
possiblePick.add(p.getKey());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user