forked from External/mage
Implement new way to generate boosters using box mapping info (WIP) (#7529)
* [THB] added initial common/uncommon collation mechanism * [THB] added rare/mythic and lands to pack generation * fixed some card names * broke out collation into its own separate classes * built collation into ExpansionSet * added note about collation information * [KHM] added collation info * updated collation to use collector number rather than name * added shuffle to set constructor * added some notes on collation methods
This commit is contained in:
parent
10e557b873
commit
8a16eda062
9 changed files with 500 additions and 3 deletions
36
Mage/src/main/java/mage/collation/BoosterStructure.java
Normal file
36
Mage/src/main/java/mage/collation/BoosterStructure.java
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
package mage.collation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Current implementation is built only for sequential collation
|
||||
* Boosters are collated through a variety of different methods
|
||||
* Striped collation not supported yet
|
||||
* For more information: https://www.lethe.xyz/mtg/collation/
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public abstract class BoosterStructure {
|
||||
|
||||
private final List<CardRun> slots;
|
||||
|
||||
protected BoosterStructure(CardRun... runs) {
|
||||
this.slots = Arrays.asList(runs);
|
||||
}
|
||||
|
||||
public List<Integer> makeRun() {
|
||||
List<Integer> cards = new ArrayList<>();
|
||||
for (CardRun run : this.slots) {
|
||||
cards.add(run.getNext());
|
||||
}
|
||||
return cards;
|
||||
}
|
||||
|
||||
public void shuffle() {
|
||||
for (CardRun run : this.slots) {
|
||||
run.shuffle();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue