mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Made sure the AI will not miss an on-color card when building draft decks.
This commit is contained in:
@@ -420,8 +420,12 @@ public class BoosterDraftAI {
|
||||
|
||||
// 2.Try to fill up to 22 with on-color non-creature cards
|
||||
int ii = 0;
|
||||
while (cardsNeeded > 0 && others.size() > 1) {
|
||||
final Card c = others.get(MyRandom.getRandom().nextInt(others.size() - 1));
|
||||
while (cardsNeeded > 0 && others.size() > 0) {
|
||||
int index = 0;
|
||||
if (others.size() > 1) {
|
||||
index = MyRandom.getRandom().nextInt(others.size() - 1);
|
||||
}
|
||||
final Card c = others.get(index);
|
||||
|
||||
// out.addMain(c.getName());
|
||||
outList.add(c);
|
||||
|
||||
Reference in New Issue
Block a user