mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
removed player's picks map from boosterDraft interface (interface should not hold static data)
removed the getCardsNumber function from BoosterGenerator (it doesn't know in advance how many cards caller will ask to generate) moved upload picks from draft deckeditor to boosterDraft class added an enum to describe limited game type tests may start failing - they would need an initialized CardDb
This commit is contained in:
@@ -72,4 +72,9 @@ public class BoosterDraftTest implements BoosterDraft {
|
||||
public CardList getUnchosenCards() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishedDrafting() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.testng.annotations.Test;
|
||||
|
||||
|
||||
import forge.game.limited.BoosterDraft_1;
|
||||
import forge.game.limited.CardPoolLimitation;
|
||||
import forge.item.CardPrinted;
|
||||
import forge.item.ItemPoolView;
|
||||
|
||||
@@ -19,7 +20,7 @@ public class BoosterDraft_1Test {
|
||||
*/
|
||||
@Test(groups = {"UnitTest", "fast"}, timeOut = 1000)
|
||||
public void BoosterDraft_1Test1() throws Exception {
|
||||
BoosterDraft_1 draft = new BoosterDraft_1();
|
||||
BoosterDraft_1 draft = new BoosterDraft_1(CardPoolLimitation.Full);
|
||||
while (draft.hasNextChoice()) {
|
||||
ItemPoolView<CardPrinted> list = draft.nextChoice();
|
||||
System.out.println(list.countAll());
|
||||
|
||||
@@ -3,6 +3,7 @@ package forge;
|
||||
import forge.deck.Deck;
|
||||
import forge.game.GameType;
|
||||
import forge.game.limited.BoosterDraft_1;
|
||||
import forge.game.limited.CardPoolLimitation;
|
||||
import forge.gui.deckeditor.DeckEditorDraft;
|
||||
|
||||
import org.testng.Assert;
|
||||
@@ -25,7 +26,7 @@ public class GuiBoosterDraftTest {
|
||||
Constant.Runtime.HumanDeck[0] = new Deck(GameType.Sealed);
|
||||
|
||||
DeckEditorDraft g = new DeckEditorDraft();
|
||||
g.showGui(new BoosterDraft_1());
|
||||
g.showGui(new BoosterDraft_1(CardPoolLimitation.Full));
|
||||
Assert.assertNotNull(g);
|
||||
g.dispose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user