mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Support actually starting a match again
This commit is contained in:
@@ -72,6 +72,7 @@ import java.awt.event.*;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -555,7 +556,7 @@ public enum FControl implements KeyEventDispatcher {
|
||||
startMatch(gameType, null, players);
|
||||
}
|
||||
|
||||
public void startMatch(GameType gameType, List<GameType> appliedVariants, List<RegisteredPlayer> players) {
|
||||
public void startMatch(GameType gameType, Set<GameType> appliedVariants, List<RegisteredPlayer> players) {
|
||||
boolean useRandomFoil = FModel.getPreferences().getPrefBoolean(FPref.UI_RANDOM_FOIL);
|
||||
for(RegisteredPlayer rp : players) {
|
||||
rp.setRandomFoil(useRandomFoil);
|
||||
|
||||
@@ -32,6 +32,7 @@ import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.Vector;
|
||||
|
||||
//import forge.gui.home.variant.VSubmenuVanguard;
|
||||
@@ -154,9 +155,7 @@ public enum CSubmenuConstructed implements ICDoc, IMenuProvider {
|
||||
view.getBtnStart().addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent arg0) {
|
||||
final List<GameType> variantTypes = new ArrayList<GameType>(4);
|
||||
variantTypes.addAll(view.getAppliedVariants());
|
||||
startGame(variantTypes);
|
||||
startGame(view.getAppliedVariants());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -184,7 +183,7 @@ public enum CSubmenuConstructed implements ICDoc, IMenuProvider {
|
||||
}
|
||||
|
||||
/** Starts a match with the applied variants. */
|
||||
private void startGame(final List<GameType> variantTypes) {
|
||||
private void startGame(final Set<GameType> variantTypes) {
|
||||
if (!view.isEnoughTeams()) {
|
||||
FOptionPane.showMessageDialog("There are not enough teams! Please adjust team allocations.");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user