Tests: fixed random gen deck

This commit is contained in:
Oleg Agafonov 2018-01-27 15:13:45 +04:00
parent 78ff3c3714
commit 9268281c4b
2 changed files with 20 additions and 2 deletions

View file

@ -208,7 +208,7 @@ public class LoadTest {
@Test
@Ignore
public void test_GameThreadWithAbort() {
// simple game thread with game abort
// simple game thread to abort
LoadGame game = new LoadGame(
"game",
@ -221,10 +221,27 @@ public class LoadTest {
Assert.assertEquals("aborted", game.gameResult);
}
@Test
@Ignore
public void test_GameThreadWithRealCards() {
// simple game thread to the end with creatures cards
LoadGame game = new LoadGame(
"game",
"thread",
createSimpleDeck("GR", false),
createSimpleDeck("GR", false)
);
game.gameStart();
game.gameWaitToStop();
Assert.assertEquals("finished", game.gameResult);
}
@Test
@Ignore
public void test_GameThreadWithConcede() {
// simple game thread with game abort
// simple game thread with with concede
LoadGame game = new LoadGame(
"game",

View file

@ -168,6 +168,7 @@ public class Sets extends HashMap<String, ExpansionSet> {
if (manaLand.getBlack() > 0 && !manaNeed.isBlack()) { cardManaOK = false; }
if (manaLand.getRed() > 0 && !manaNeed.isRed()) { cardManaOK = false; }
if (manaLand.getGreen() > 0 && !manaNeed.isGreen()) { cardManaOK = false; }
if (manaLand.getColorless() > 0) { cardManaOK = false; } // ignore colorless land (wastes)
}
} else {
// cards