mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Refactor GauntletWinLose
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -16644,6 +16644,7 @@ forge-gui/src/main/java/forge/events/UiEventAttackerDeclared.java -text
|
||||
forge-gui/src/main/java/forge/events/UiEventBlockerAssigned.java -text
|
||||
forge-gui/src/main/java/forge/gauntlet/GauntletData.java -text
|
||||
forge-gui/src/main/java/forge/gauntlet/GauntletIO.java -text
|
||||
forge-gui/src/main/java/forge/gauntlet/GauntletWinLoseController.java -text
|
||||
forge-gui/src/main/java/forge/interfaces/IButton.java -text
|
||||
forge-gui/src/main/java/forge/interfaces/ICheckBox.java -text
|
||||
forge-gui/src/main/java/forge/interfaces/IComboBox.java -text
|
||||
|
||||
@@ -17,21 +17,9 @@ package forge.screens.match;
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import forge.GuiBase;
|
||||
import forge.LobbyPlayer;
|
||||
import forge.Singletons;
|
||||
import forge.assets.FSkinProp;
|
||||
import forge.control.FControl;
|
||||
import forge.deck.Deck;
|
||||
import forge.game.Game;
|
||||
import forge.game.GameType;
|
||||
import forge.game.Match;
|
||||
import forge.game.player.RegisteredPlayer;
|
||||
import forge.gauntlet.GauntletData;
|
||||
import forge.gauntlet.GauntletIO;
|
||||
import forge.model.FModel;
|
||||
import forge.gauntlet.GauntletWinLoseController;
|
||||
import forge.toolbox.FLabel;
|
||||
import forge.toolbox.FSkin;
|
||||
import forge.toolbox.FSkin.SkinnedPanel;
|
||||
@@ -47,6 +35,8 @@ import java.util.List;
|
||||
* games.
|
||||
*/
|
||||
public class GauntletWinLose extends ControlWinLose {
|
||||
private final GauntletWinLoseController controller;
|
||||
|
||||
/**
|
||||
* Instantiates a new gauntlet win/lose handler.
|
||||
*
|
||||
@@ -55,112 +45,16 @@ public class GauntletWinLose extends ControlWinLose {
|
||||
*/
|
||||
public GauntletWinLose(final ViewWinLose view0, Game lastGame) {
|
||||
super(view0, lastGame);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* populateCustomPanel.
|
||||
* </p>
|
||||
* @return true
|
||||
*/
|
||||
controller = new GauntletWinLoseController(view0, lastGame) {
|
||||
@Override
|
||||
public final boolean populateCustomPanel() {
|
||||
final GauntletData gd = FModel.getGauntletData();
|
||||
final List<String> lstEventNames = gd.getEventNames();
|
||||
final List<Deck> lstDecks = gd.getDecks();
|
||||
final List<String> lstEventRecords = gd.getEventRecords();
|
||||
final int len = lstDecks.size();
|
||||
final int num = gd.getCompleted();
|
||||
JLabel lblGraphic = null;
|
||||
JLabel lblMessage1 = null;
|
||||
JLabel lblMessage2 = null;
|
||||
|
||||
// No restarts.
|
||||
this.getView().getBtnRestart().setVisible(false);
|
||||
|
||||
// Generic event record.
|
||||
lstEventRecords.set(gd.getCompleted(), "Ongoing");
|
||||
|
||||
final Match match = lastGame.getMatch();
|
||||
|
||||
// Match won't be saved until it is over. This opens up a cheat
|
||||
// or failsafe mechanism (depending on your perspective) in which
|
||||
// the player can restart Forge to replay a match.
|
||||
// Pretty sure this can't be fixed until in-game states can be
|
||||
// saved. Doublestrike 07-10-12
|
||||
LobbyPlayer questPlayer = GuiBase.getInterface().getQuestPlayer();
|
||||
|
||||
// In all cases, update stats.
|
||||
lstEventRecords.set(gd.getCompleted(), match.getGamesWonBy(questPlayer) + " - "
|
||||
+ (match.getPlayedGames().size() - match.getGamesWonBy(questPlayer)));
|
||||
|
||||
if (match.isMatchOver()) {
|
||||
gd.setCompleted(gd.getCompleted() + 1);
|
||||
|
||||
// Win match case
|
||||
if (match.isWonBy(questPlayer)) {
|
||||
// Gauntlet complete: Remove save file
|
||||
if (gd.getCompleted() == lstDecks.size()) {
|
||||
lblGraphic = new FLabel.Builder()
|
||||
.icon(FSkin.getIcon(FSkinProp.ICO_QUEST_COIN)).build();
|
||||
lblMessage1 = new FLabel.Builder().fontSize(24)
|
||||
.text("CONGRATULATIONS!").build();
|
||||
lblMessage2 = new FLabel.Builder().fontSize(18)
|
||||
.text("You made it through the gauntlet!").build();
|
||||
|
||||
this.getView().getBtnContinue().setVisible(false);
|
||||
this.getView().getBtnContinue().repaintSelf();
|
||||
this.getView().getBtnQuit().setText("OK");
|
||||
|
||||
// Remove save file if it's a quickie, or just reset it.
|
||||
if (gd.getName().startsWith(GauntletIO.PREFIX_QUICK)) {
|
||||
GauntletIO.getGauntletFile(gd).delete();
|
||||
}
|
||||
else {
|
||||
gd.reset();
|
||||
}
|
||||
}
|
||||
// Or, save and move to next game
|
||||
else {
|
||||
gd.stamp();
|
||||
GauntletIO.saveGauntlet(gd);
|
||||
|
||||
this.getView().getBtnContinue().setVisible(true);
|
||||
this.getView().getBtnContinue().setEnabled(true);
|
||||
this.getView().getBtnQuit().setText("Save and Quit");
|
||||
}
|
||||
}
|
||||
// Lose match case; stop gauntlet.
|
||||
else {
|
||||
lblGraphic = new FLabel.Builder()
|
||||
.icon(FSkin.getIcon(FSkinProp.ICO_QUEST_HEART)).build();
|
||||
lblMessage1 = new FLabel.Builder().fontSize(24)
|
||||
.text("DEFEATED!").build();
|
||||
lblMessage2 = new FLabel.Builder().fontSize(18)
|
||||
.text("You have failed to pass the gauntlet.").build();
|
||||
|
||||
this.getView().getBtnContinue().setVisible(false);
|
||||
|
||||
// Remove save file if it's a quickie, or just reset it.
|
||||
if (gd.getName().startsWith(GauntletIO.PREFIX_QUICK)) {
|
||||
GauntletIO.getGauntletFile(gd).delete();
|
||||
}
|
||||
else {
|
||||
gd.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gd.setEventRecords(lstEventRecords);
|
||||
|
||||
// Custom panel display
|
||||
protected void showOutcome(String message1, String message2, FSkinProp icon, List<String> lstEventNames, List<String> lstEventRecords, int len, int num) {
|
||||
final JLabel lblTitle = new FLabel.Builder().text("Gauntlet Progress")
|
||||
.fontAlign(SwingConstants.CENTER).fontSize(18).build();
|
||||
|
||||
final JPanel pnlResults = new JPanel();
|
||||
pnlResults.setOpaque(false);
|
||||
pnlResults.setLayout(new MigLayout("insets 0, gap 0, wrap "
|
||||
+ (int) Math.ceil(gd.getDecks().size() / 2d) + ", flowy"));
|
||||
+ (int) Math.ceil(len / 2d) + ", flowy"));
|
||||
|
||||
JLabel lblTemp;
|
||||
for (int i = 0; i < len; i++) {
|
||||
@@ -179,38 +73,42 @@ public class GauntletWinLose extends ControlWinLose {
|
||||
pnlResults.add(lblTemp, "w 50%!, h 25px!, gap 0 0 5px 0");
|
||||
}
|
||||
|
||||
final SkinnedPanel pnl = this.getView().getPnlCustom();
|
||||
final SkinnedPanel pnl = view0.getPnlCustom();
|
||||
pnl.setLayout(new MigLayout("insets 0, gap 0, wrap, ax center"));
|
||||
pnl.setOpaque(true);
|
||||
pnl.setBackground(FSkin.getColor(FSkin.Colors.CLR_THEME2));
|
||||
pnl.add(lblTitle, "gap 0 0 20px 10px, ax center");
|
||||
pnl.add(pnlResults, "w 96%!, growy, pushy, gap 2% 0 0 0");
|
||||
|
||||
if (lblGraphic != null) {
|
||||
pnl.add(lblGraphic, "w 120px!, h 120px!, ax center");
|
||||
pnl.add(lblMessage1, "w 96%!, h 40px!, gap 2% 0 0 0");
|
||||
pnl.add(lblMessage2, "w 96%!, h 40px!, gap 2% 0 0 50px");
|
||||
if (message1 != null) {
|
||||
pnl.add(new FLabel.Builder().icon(FSkin.getIcon(icon)).build(), "w 120px!, h 120px!, ax center");
|
||||
pnl.add(new FLabel.Builder().fontSize(24).text(message1).build(), "w 96%!, h 40px!, gap 2% 0 0 0");
|
||||
pnl.add(new FLabel.Builder().fontSize(18).text(message2).build(), "w 96%!, h 40px!, gap 2% 0 0 50px");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void saveOptions() {
|
||||
GauntletWinLose.this.saveOptions();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* populateCustomPanel.
|
||||
* </p>
|
||||
* @return true
|
||||
*/
|
||||
@Override
|
||||
public final boolean populateCustomPanel() {
|
||||
controller.showOutcome();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionOnContinue() {
|
||||
if (lastGame.getMatch().isMatchOver()) {
|
||||
// To change the AI deck, we have to create a new match.
|
||||
GauntletData gd = FModel.getGauntletData();
|
||||
Deck aiDeck = gd.getDecks().get(gd.getCompleted());
|
||||
List<RegisteredPlayer> players = Lists.newArrayList();
|
||||
FControl fc = Singletons.getControl();
|
||||
players.add(new RegisteredPlayer(gd.getUserDeck()).setPlayer(fc.getGuiPlayer()));
|
||||
players.add(new RegisteredPlayer(aiDeck).setPlayer(fc.getAiPlayer()));
|
||||
|
||||
saveOptions();
|
||||
fc.endCurrentGame();
|
||||
|
||||
fc.startMatch(GameType.Gauntlet, players);
|
||||
} else {
|
||||
if (!controller.actionOnContinue()) {
|
||||
super.actionOnContinue();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class FDeckChooser extends FScreen {
|
||||
private final ForgePreferences prefs = FModel.getPreferences();
|
||||
private FPref stateSetting = null;
|
||||
|
||||
//Show dialog to select a deck
|
||||
//Show screen to select a deck
|
||||
public static void promptForDeck(String title, GameType gameType, boolean forAi, final Callback<Deck> callback) {
|
||||
FThreads.assertExecutedByEdt(true);
|
||||
final FDeckChooser chooser = new FDeckChooser(gameType, forAi, null) {
|
||||
|
||||
@@ -17,22 +17,12 @@ package forge.screens.match.winlose;
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import forge.GuiBase;
|
||||
import forge.LobbyPlayer;
|
||||
import forge.assets.FSkinImage;
|
||||
import forge.deck.Deck;
|
||||
import forge.FThreads;
|
||||
import forge.assets.FSkinProp;
|
||||
import forge.game.Game;
|
||||
import forge.game.GameType;
|
||||
import forge.game.Match;
|
||||
import forge.game.player.RegisteredPlayer;
|
||||
import forge.gauntlet.GauntletData;
|
||||
import forge.gauntlet.GauntletIO;
|
||||
import forge.interfaces.IGuiBase;
|
||||
import forge.model.FModel;
|
||||
import forge.screens.match.FControl;
|
||||
import forge.toolbox.FOptionPane;
|
||||
import forge.gauntlet.GauntletWinLoseController;
|
||||
import forge.util.gui.SOptionPane;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -40,6 +30,8 @@ import java.util.List;
|
||||
* games.
|
||||
*/
|
||||
public class GauntletWinLose extends ControlWinLose {
|
||||
private final GauntletWinLoseController controller;
|
||||
|
||||
/**
|
||||
* Instantiates a new gauntlet win/lose handler.
|
||||
*
|
||||
@@ -48,91 +40,12 @@ public class GauntletWinLose extends ControlWinLose {
|
||||
*/
|
||||
public GauntletWinLose(final ViewWinLose view0, Game lastGame) {
|
||||
super(view0, lastGame);
|
||||
}
|
||||
|
||||
controller = new GauntletWinLoseController(view0, lastGame) {
|
||||
@Override
|
||||
public final void showRewards() {
|
||||
final GauntletData gd = FModel.getGauntletData();
|
||||
final List<String> lstEventNames = gd.getEventNames();
|
||||
final List<Deck> lstDecks = gd.getDecks();
|
||||
final List<String> lstEventRecords = gd.getEventRecords();
|
||||
final int len = lstDecks.size();
|
||||
final int num = gd.getCompleted();
|
||||
FSkinImage icon = null;
|
||||
String message1 = "";
|
||||
String message2 = "";
|
||||
|
||||
// No restarts.
|
||||
getView().getBtnRestart().setVisible(false);
|
||||
|
||||
// Generic event record.
|
||||
lstEventRecords.set(gd.getCompleted(), "Ongoing");
|
||||
|
||||
final Match match = lastGame.getMatch();
|
||||
|
||||
// Match won't be saved until it is over. This opens up a cheat
|
||||
// or failsafe mechanism (depending on your perspective) in which
|
||||
// the player can restart Forge to replay a match.
|
||||
// Pretty sure this can't be fixed until in-game states can be
|
||||
// saved. Doublestrike 07-10-12
|
||||
LobbyPlayer questPlayer = GuiBase.getInterface().getQuestPlayer();
|
||||
|
||||
// In all cases, update stats.
|
||||
lstEventRecords.set(gd.getCompleted(), match.getGamesWonBy(questPlayer) + " - "
|
||||
+ (match.getPlayedGames().size() - match.getGamesWonBy(questPlayer)));
|
||||
|
||||
if (match.isMatchOver()) {
|
||||
gd.setCompleted(gd.getCompleted() + 1);
|
||||
|
||||
// Win match case
|
||||
if (match.isWonBy(questPlayer)) {
|
||||
// Gauntlet complete: Remove save file
|
||||
if (gd.getCompleted() == lstDecks.size()) {
|
||||
icon = FSkinImage.QUEST_COIN;
|
||||
message1 = "CONGRATULATIONS!";
|
||||
message2 = "You made it through the gauntlet!";
|
||||
|
||||
getView().getBtnContinue().setVisible(false);
|
||||
getView().getBtnQuit().setText("OK");
|
||||
|
||||
// Remove save file if it's a quickie, or just reset it.
|
||||
if (gd.getName().startsWith(GauntletIO.PREFIX_QUICK)) {
|
||||
GauntletIO.getGauntletFile(gd).delete();
|
||||
}
|
||||
else {
|
||||
gd.reset();
|
||||
}
|
||||
}
|
||||
// Or, save and move to next game
|
||||
else {
|
||||
gd.stamp();
|
||||
GauntletIO.saveGauntlet(gd);
|
||||
|
||||
getView().getBtnContinue().setVisible(true);
|
||||
getView().getBtnContinue().setEnabled(true);
|
||||
getView().getBtnQuit().setText("Save and Quit");
|
||||
}
|
||||
}
|
||||
// Lose match case; stop gauntlet.
|
||||
else {
|
||||
icon = FSkinImage.QUEST_HEART;
|
||||
message1 = "DEFEATED!";
|
||||
message2 = "You have failed to pass the gauntlet.";
|
||||
|
||||
getView().getBtnContinue().setVisible(false);
|
||||
|
||||
// Remove save file if it's a quickie, or just reset it.
|
||||
if (gd.getName().startsWith(GauntletIO.PREFIX_QUICK)) {
|
||||
GauntletIO.getGauntletFile(gd).delete();
|
||||
}
|
||||
else {
|
||||
gd.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gd.setEventRecords(lstEventRecords);
|
||||
|
||||
protected void showOutcome(final String message1, final String message2, final FSkinProp icon, final List<String> lstEventNames, final List<String> lstEventRecords, final int len, final int num) {
|
||||
FThreads.invokeInBackgroundThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (i <= num) {
|
||||
@@ -144,29 +57,35 @@ public class GauntletWinLose extends ControlWinLose {
|
||||
}
|
||||
}
|
||||
|
||||
if (message1 != null) {
|
||||
sb.append("\n");
|
||||
sb.append(message1 + "\n\n");
|
||||
sb.append(message2);
|
||||
}
|
||||
else {
|
||||
sb.deleteCharAt(sb.length() - 1); //remove final new line character
|
||||
}
|
||||
|
||||
FOptionPane.showMessageDialog(sb.toString(), "Gauntlet Progress", icon);
|
||||
SOptionPane.showMessageDialog(sb.toString(), "Gauntlet Progress", icon);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void saveOptions() {
|
||||
GauntletWinLose.this.saveOptions();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void showRewards() {
|
||||
controller.showOutcome();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionOnContinue() {
|
||||
if (lastGame.getMatch().isMatchOver()) {
|
||||
// To change the AI deck, we have to create a new match.
|
||||
GauntletData gd = FModel.getGauntletData();
|
||||
Deck aiDeck = gd.getDecks().get(gd.getCompleted());
|
||||
List<RegisteredPlayer> players = Lists.newArrayList();
|
||||
IGuiBase fc = GuiBase.getInterface();
|
||||
players.add(new RegisteredPlayer(gd.getUserDeck()).setPlayer(fc.getGuiPlayer()));
|
||||
players.add(new RegisteredPlayer(aiDeck).setPlayer(fc.createAiPlayer()));
|
||||
|
||||
saveOptions();
|
||||
FControl.endCurrentGame();
|
||||
|
||||
FControl.startMatch(GameType.Gauntlet, players);
|
||||
} else {
|
||||
if (!controller.actionOnContinue()) {
|
||||
super.actionOnContinue();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
package forge.gauntlet;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import forge.GuiBase;
|
||||
import forge.LobbyPlayer;
|
||||
import forge.assets.FSkinProp;
|
||||
import forge.deck.Deck;
|
||||
import forge.game.Game;
|
||||
import forge.game.GameType;
|
||||
import forge.game.Match;
|
||||
import forge.game.player.RegisteredPlayer;
|
||||
import forge.interfaces.IButton;
|
||||
import forge.interfaces.IGuiBase;
|
||||
import forge.interfaces.IWinLoseView;
|
||||
import forge.model.FModel;
|
||||
|
||||
public abstract class GauntletWinLoseController {
|
||||
private final Game lastGame;
|
||||
private final IWinLoseView<? extends IButton> view;
|
||||
|
||||
public GauntletWinLoseController(IWinLoseView<? extends IButton> view0, Game lastGame0) {
|
||||
view = view0;
|
||||
lastGame = lastGame0;
|
||||
}
|
||||
|
||||
public void showOutcome() {
|
||||
final GauntletData gd = FModel.getGauntletData();
|
||||
final List<String> lstEventNames = gd.getEventNames();
|
||||
final List<Deck> lstDecks = gd.getDecks();
|
||||
final List<String> lstEventRecords = gd.getEventRecords();
|
||||
final int len = lstDecks.size();
|
||||
final int num = gd.getCompleted();
|
||||
FSkinProp icon = null;
|
||||
String message1 = null;
|
||||
String message2 = null;
|
||||
|
||||
// No restarts.
|
||||
view.getBtnRestart().setVisible(false);
|
||||
|
||||
// Generic event record.
|
||||
lstEventRecords.set(gd.getCompleted(), "Ongoing");
|
||||
|
||||
final Match match = lastGame.getMatch();
|
||||
|
||||
// Match won't be saved until it is over. This opens up a cheat
|
||||
// or failsafe mechanism (depending on your perspective) in which
|
||||
// the player can restart Forge to replay a match.
|
||||
// Pretty sure this can't be fixed until in-game states can be
|
||||
// saved. Doublestrike 07-10-12
|
||||
LobbyPlayer questPlayer = GuiBase.getInterface().getQuestPlayer();
|
||||
|
||||
// In all cases, update stats.
|
||||
lstEventRecords.set(gd.getCompleted(), match.getGamesWonBy(questPlayer) + " - "
|
||||
+ (match.getPlayedGames().size() - match.getGamesWonBy(questPlayer)));
|
||||
|
||||
if (match.isMatchOver()) {
|
||||
gd.setCompleted(gd.getCompleted() + 1);
|
||||
|
||||
// Win match case
|
||||
if (match.isWonBy(questPlayer)) {
|
||||
// Gauntlet complete: Remove save file
|
||||
if (gd.getCompleted() == lstDecks.size()) {
|
||||
icon = FSkinProp.ICO_QUEST_COIN;
|
||||
message1 = "CONGRATULATIONS!";
|
||||
message2 = "You made it through the gauntlet!";
|
||||
|
||||
view.getBtnContinue().setVisible(false);
|
||||
view.getBtnQuit().setText("OK");
|
||||
|
||||
// Remove save file if it's a quickie, or just reset it.
|
||||
if (gd.getName().startsWith(GauntletIO.PREFIX_QUICK)) {
|
||||
GauntletIO.getGauntletFile(gd).delete();
|
||||
}
|
||||
else {
|
||||
gd.reset();
|
||||
}
|
||||
}
|
||||
// Or, save and move to next game
|
||||
else {
|
||||
gd.stamp();
|
||||
GauntletIO.saveGauntlet(gd);
|
||||
|
||||
view.getBtnContinue().setVisible(true);
|
||||
view.getBtnContinue().setEnabled(true);
|
||||
view.getBtnQuit().setText("Save and Quit");
|
||||
}
|
||||
}
|
||||
// Lose match case; stop gauntlet.
|
||||
else {
|
||||
icon = FSkinProp.ICO_QUEST_HEART;
|
||||
message1 = "DEFEATED!";
|
||||
message2 = "You have failed to pass the gauntlet.";
|
||||
|
||||
view.getBtnContinue().setVisible(false);
|
||||
|
||||
// Remove save file if it's a quickie, or just reset it.
|
||||
if (gd.getName().startsWith(GauntletIO.PREFIX_QUICK)) {
|
||||
GauntletIO.getGauntletFile(gd).delete();
|
||||
}
|
||||
else {
|
||||
gd.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gd.setEventRecords(lstEventRecords);
|
||||
|
||||
showOutcome(message1, message2, icon, lstEventNames, lstEventRecords, len, num);
|
||||
}
|
||||
|
||||
public final boolean actionOnContinue() {
|
||||
if (lastGame.getMatch().isMatchOver()) {
|
||||
// To change the AI deck, we have to create a new match.
|
||||
GauntletData gd = FModel.getGauntletData();
|
||||
Deck aiDeck = gd.getDecks().get(gd.getCompleted());
|
||||
List<RegisteredPlayer> players = Lists.newArrayList();
|
||||
IGuiBase fc = GuiBase.getInterface();
|
||||
players.add(new RegisteredPlayer(gd.getUserDeck()).setPlayer(fc.getGuiPlayer()));
|
||||
players.add(new RegisteredPlayer(aiDeck).setPlayer(fc.createAiPlayer()));
|
||||
|
||||
view.hide();
|
||||
saveOptions();
|
||||
GuiBase.getInterface().endCurrentGame();
|
||||
|
||||
GuiBase.getInterface().startMatch(GameType.Gauntlet, players);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected abstract void showOutcome(String message1, String message2, FSkinProp icon, List<String> lstEventNames, List<String> lstEventRecords, int len, int num);
|
||||
protected abstract void saveOptions();
|
||||
}
|
||||
Reference in New Issue
Block a user