mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 13:32:06 -08:00
changed collation to strings to allow non-int collector numbers
This commit is contained in:
parent
1239a0299b
commit
073ec1cdb9
6 changed files with 34 additions and 34 deletions
|
|
@ -122,7 +122,7 @@ public abstract class ExpansionSet implements Serializable {
|
|||
protected int maxCardNumberInBooster; // used to omit cards with collector numbers beyond the regular cards in a set for boosters
|
||||
|
||||
protected final EnumMap<Rarity, List<CardInfo>> savedCards;
|
||||
protected final Map<Integer, CardInfo> inBoosterMap = new HashMap<>();
|
||||
protected final Map<String, CardInfo> inBoosterMap = new HashMap<>();
|
||||
|
||||
public ExpansionSet(String name, String code, Date releaseDate, SetType setType) {
|
||||
this(name, code, releaseDate, setType, null);
|
||||
|
|
@ -290,7 +290,7 @@ public abstract class ExpansionSet implements Serializable {
|
|||
.instance
|
||||
.findCards(criteria)
|
||||
.stream()
|
||||
.forEach(cardInfo -> inBoosterMap.put(cardInfo.getCardNumberAsInt(), cardInfo));
|
||||
.forEach(cardInfo -> inBoosterMap.put(cardInfo.getCardNumber(), cardInfo));
|
||||
}
|
||||
return boosterCollator
|
||||
.makeBooster()
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ public interface BoosterCollator {
|
|||
|
||||
public void shuffle();
|
||||
|
||||
public List<Integer> makeBooster();
|
||||
public List<String> makeBooster();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ public abstract class BoosterStructure {
|
|||
this.slots = Arrays.asList(runs);
|
||||
}
|
||||
|
||||
public List<Integer> makeRun() {
|
||||
List<Integer> cards = new ArrayList<>();
|
||||
public List<String> makeRun() {
|
||||
List<String> cards = new ArrayList<>();
|
||||
for (CardRun run : this.slots) {
|
||||
cards.add(run.getNext());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ package mage.collation;
|
|||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public abstract class CardRun extends Rotater<Integer> {
|
||||
public abstract class CardRun extends Rotater<String> {
|
||||
|
||||
public CardRun(boolean keepOrder, Integer... names) {
|
||||
super(keepOrder, names);
|
||||
public CardRun(boolean keepOrder, String... numbers) {
|
||||
super(keepOrder, numbers);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue