Fixed possible exception during draft player repplacement.
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.game.draft;
+import java.util.*;
import mage.cards.Card;
import mage.cards.ExpansionSet;
import mage.game.draft.DraftOptions.TimingOption;
@@ -36,8 +36,6 @@ import mage.game.events.TableEvent.EventType;
import mage.players.Player;
import mage.players.PlayerList;
-import java.util.*;
-
/**
*
* @author BetaSteward_at_googlemail.com
@@ -117,8 +115,10 @@ public abstract class DraftImpl implements Draft {
}
if (oldDraftPlayer.isPicking()) {
newDraftPlayer.setPicking();
+ if (!newDraftPlayer.getBooster().isEmpty()) {
newDraftPlayer.getPlayer().pickCard(newDraftPlayer.getBooster(), newDraftPlayer.getDeck(), this);
}
+ }
return true;
}
return false;
@@ -151,7 +151,6 @@ public abstract class DraftImpl implements Draft {
return numberBoosters;
}
-
@Override
public List<ExpansionSet> getSets() {
return sets;
@@ -219,7 +218,6 @@ public abstract class DraftImpl implements Draft {
}
}
-
protected void openBooster() {
if (boosterNum < numberBoosters) {
for (DraftPlayer player : players.values()) {
@@ -248,7 +246,8 @@ public abstract class DraftImpl implements Draft {
while (!donePicking()) {
try {
this.wait();
- } catch (InterruptedException ex) { }
+ } catch (InterruptedException ex) {
+ }
}
}
return true;
@@ -350,5 +349,4 @@ public abstract class DraftImpl implements Draft {
}
-
}
