mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
tests: added tests for auto-lands suggestion in deck editor and tourney (related to #13127)
This commit is contained in:
parent
40e2cf7cda
commit
2955535927
4 changed files with 180 additions and 21 deletions
|
|
@ -87,7 +87,7 @@ public class AddLandDialog extends MageDialog {
|
|||
landSetNames.add(expansionInfo.getName());
|
||||
}
|
||||
if (landSetNames.isEmpty()) {
|
||||
throw new IllegalArgumentException("No set with basic land was found");
|
||||
throw new IllegalArgumentException("No set with basic land was found (possible memory problems, need client restart)");
|
||||
}
|
||||
if (landSetNames.size() > 1) {
|
||||
landSetNames.add("<Random lands>");
|
||||
|
|
@ -477,6 +477,7 @@ public class AddLandDialog extends MageDialog {
|
|||
}//GEN-LAST:event_btnSetFastSearchActionPerformed
|
||||
|
||||
private void autoAddLands() {
|
||||
// suggest lands amount for deck without lands
|
||||
int deckSize = ((Number) spnDeckSize.getValue()).intValue();
|
||||
int[] lands = DeckBuildUtils.landCountSuggestion(deckSize, deck.getMaindeckCards());
|
||||
spnPlains.setValue(lands[0]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue