- Fixed changes in buildDeck of BoosterDraftAI.

This commit is contained in:
Sloth
2011-12-14 10:23:46 +00:00
parent 292426c17e
commit 080d0ad46d

View File

@@ -384,8 +384,8 @@ public class BoosterDraftAI {
// 1.Add up to 15 on-color creatures
int i = 0;
while (nCreatures > 0 && creatures.size() > i) {
final Card c = creatures.get(i);
while (nCreatures > 0 && creatures.size() > 0) {
final Card c = creatures.get(0);
outList.add(c);
cardsNeeded--;
@@ -436,10 +436,10 @@ public class BoosterDraftAI {
}
}
// 3.Try to fill up to 22 with on-color creatures cards (if more than 15 are present)
i = 0;
while (cardsNeeded > 0 && (i < creatures.size())) {
final Card c = creatures.get(i);
// 3.Try to fill up to 22 with on-color creatures cards (if more than 15 are present)
while (cardsNeeded > 0 && (0 < creatures.size())) {
final Card c = creatures.get(0);
outList.add(c);
cardsNeeded--;