refactor: rename "remixed" to "reshuffled" (#12755)

This commit is contained in:
xenohedron 2024-09-01 01:08:26 -04:00 committed by GitHub
parent d7fa7f673d
commit 54874a59b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 88 additions and 88 deletions

View file

@ -1,28 +0,0 @@
package mage.game.draft;
import mage.cards.ExpansionSet;
import java.util.List;
public class RemixedBoosterDraft extends BoosterDraft {
final RemixedSet remixedSet;
public RemixedBoosterDraft(DraftOptions options, List<ExpansionSet> sets) {
super(options, sets);
if (sets.isEmpty()){
throw new RuntimeException("At least one set must be selected for remixed booster draft");
}
remixedSet = new RemixedSet(sets, 10, 3, 1);
}
@Override
protected void openBooster() {
if (boosterNum <= numberBoosters) {
for (DraftPlayer player: players.values()) {
player.setBooster(remixedSet.createBooster());
}
}
}
}

View file

@ -0,0 +1,28 @@
package mage.game.draft;
import mage.cards.ExpansionSet;
import java.util.List;
public class ReshuffledBoosterDraft extends BoosterDraft {
final ReshuffledSet reshuffledSet;
public ReshuffledBoosterDraft(DraftOptions options, List<ExpansionSet> sets) {
super(options, sets);
if (sets.isEmpty()){
throw new IllegalStateException("At least one set must be selected for reshuffled booster draft");
}
reshuffledSet = new ReshuffledSet(sets, 10, 3, 1);
}
@Override
protected void openBooster() {
if (boosterNum <= numberBoosters) {
for (DraftPlayer player: players.values()) {
player.setBooster(reshuffledSet.createBooster());
}
}
}
}

View file

@ -16,7 +16,7 @@ import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
public class RemixedSet implements Serializable {
public class ReshuffledSet implements Serializable {
protected final int numBoosterCommons;
protected final int numBoosterUncommons;
@ -29,11 +29,11 @@ public class RemixedSet implements Serializable {
protected final List<CardInfo> specials;
protected final double chanceMythic;
public RemixedSet (List<ExpansionSet> sets, int c, int u, int r) {
public ReshuffledSet(List<ExpansionSet> sets, int c, int u, int r) {
this(sets, c, u, r, 0);
}
public RemixedSet(List<ExpansionSet> sets, int c, int u, int r, int special) {
public ReshuffledSet(List<ExpansionSet> sets, int c, int u, int r, int special) {
this.numBoosterCommons = c;
this.numBoosterUncommons = u;
this.numBoosterRares = r;
@ -58,7 +58,7 @@ public class RemixedSet implements Serializable {
List<CardInfo> cardInfos = CardRepository.instance.findCards(new CardCriteria()
.setCodes(set.getCode())
.rarities(rarity)
.maxCardNumber(set.getMaxCardNumberInBooster())); // TODO: Make sure this parameter is set appropriately where needed
.maxCardNumber(set.getMaxCardNumberInBooster()));
cardInfos.removeIf(next -> (
next.getCardNumber().contains("*")