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:
Evan Kranzler 2021-02-12 17:35:28 -05:00 committed by GitHub
parent 10e557b873
commit 8a16eda062
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 500 additions and 3 deletions

View 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();
}
}
}