forked from External/mage
* Sideboarding: fixed that it possible to auto-submit 40 cards deck instead 60 in constructed formats (#5579);
Sideboarding: fixed that cheated deck with sideboard can be used instead lose the game;
This commit is contained in:
parent
3dd6836559
commit
de4befb9c2
22 changed files with 204 additions and 124 deletions
|
|
@ -1,14 +1,13 @@
|
|||
|
||||
package mage.cards.decks;
|
||||
|
||||
import mage.cards.Card;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import mage.cards.Card;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public abstract class DeckValidator implements Serializable {
|
||||
|
|
@ -32,11 +31,10 @@ public abstract class DeckValidator implements Serializable {
|
|||
}
|
||||
|
||||
protected void countCards(Map<String, Integer> counts, Collection<Card> cards) {
|
||||
for (Card card: cards) {
|
||||
for (Card card : cards) {
|
||||
if (counts.containsKey(card.getName())) {
|
||||
counts.put(card.getName(), counts.get(card.getName()) + 1);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
counts.put(card.getName(), 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -45,4 +43,8 @@ public abstract class DeckValidator implements Serializable {
|
|||
public int getEdhPowerLevel(Deck deck) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public abstract int getDeckMinSize();
|
||||
|
||||
public abstract int getSideboardMinSize();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue