forked from External/mage
Added test and fixed some possible null pointer exception.
This commit is contained in:
parent
13c8f3263f
commit
bf43ea9936
10 changed files with 130 additions and 31 deletions
|
|
@ -193,8 +193,11 @@ public abstract class ExpansionSet implements Serializable {
|
|||
|
||||
if (15 > theBooster.size()) {
|
||||
List<CardInfo> commons = getCardsByRarity(Rarity.COMMON);
|
||||
while (15 > theBooster.size()) {
|
||||
while (15 > theBooster.size() && !commons.isEmpty()) {
|
||||
addToBooster(theBooster, commons);
|
||||
if (commons.isEmpty()) {
|
||||
commons = getCardsByRarity(Rarity.COMMON);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue