GUI, table: improved save/load table config for new tourney dialog (miss num seats, decks, skill, player types and other params, related to #12981)

This commit is contained in:
Oleg Agafonov 2024-10-12 11:31:42 +04:00
parent d9e558f9c3
commit 2b9ae8e0aa
7 changed files with 147 additions and 69 deletions

View file

@ -37,9 +37,9 @@ public class NewTableDialog extends MageDialog {
private static final Logger logger = Logger.getLogger(NewTableDialog.class);
private static final int DEFAULT_COMPUTER_PLAYER_SKILL_LEVEL = 2;
private static final String PLAYER_DATA_DELIMETER_OLD = ","; // need for compatibility with old version
private static final String PLAYER_DATA_DELIMETER_NEW = "@@@";
public static final int DEFAULT_COMPUTER_PLAYER_SKILL_LEVEL = 2;
public static final String PLAYER_DATA_DELIMETER_OLD = ","; // need for compatibility with old version
public static final String PLAYER_DATA_DELIMETER_NEW = "@@@";
private final CustomOptionsDialog customOptions;
private TableView table;
@ -776,8 +776,8 @@ public class NewTableDialog extends MageDialog {
(Listener<Event>) event -> drawPlayers()
);
}
}
// remove un-used panels
if (numPlayers < players.size()) {
while (players.size() != numPlayers) {
@ -814,7 +814,7 @@ public class NewTableDialog extends MageDialog {
}
}
playerPanel.init(i + 1, playerType, playerSkill, playerDeck);
playerPanel.init(i + 2, playerType, playerSkill, playerDeck);
}
drawPlayers();

View file

@ -6,6 +6,7 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.*;
import java.util.List;
import java.util.stream.Collectors;
import javax.swing.*;
import mage.cards.decks.Deck;
@ -39,6 +40,10 @@ public class NewTournamentDialog extends MageDialog {
private static final Logger logger = Logger.getLogger(NewTournamentDialog.class);
// temp settings on loading players list
private final List<PlayerType> prefPlayerTypes = new ArrayList<>();
private final List<Integer> prefPlayerSkills = new ArrayList<>();
private TableView table;
// private UUID playerId;
private UUID roomId;
@ -70,6 +75,16 @@ public class NewTournamentDialog extends MageDialog {
this.spnMinimumRating.setModel(new SpinnerNumberModel(0, 0, 3000, 10));
}
private int getCurrentNumPlayers() {
int res = (Integer) spnNumPlayers.getValue();
return res > 0 ? res : 2;
}
private int getCurrentNumSeats() {
int res = (Integer) spnNumSeats.getValue();
return res > 0 ? res : 2;
}
public void showDialog(UUID roomId) {
this.roomId = roomId;
if (!lastSessionId.equals(SessionHandler.getSessionId())) {
@ -89,11 +104,6 @@ public class NewTournamentDialog extends MageDialog {
.filter(o -> !o.equals(TimingOption.NONE))
.toArray())
);
// update player types
int i = 2;
for (TournamentPlayerPanel tournamentPlayerPanel : players) {
tournamentPlayerPanel.init(i++);
}
cbAllowSpectators.setSelected(true);
this.setModal(true);
this.setLocation(150, 100);
@ -648,7 +658,7 @@ public class NewTournamentDialog extends MageDialog {
}// </editor-fold>//GEN-END:initComponents
private void cbTournamentTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbTournamentTypeActionPerformed
prepareTourneyView((Integer) this.spnNumPlayers.getValue());
prepareTourneyView(false, prepareVersionStr(-1, false), getCurrentNumPlayers(), getCurrentNumSeats());
jumpstartPacksFilename = "";
if (cbTournamentType.getSelectedItem().toString().matches(".*Jumpstart.*Custom.*")) {
@ -703,6 +713,7 @@ public class NewTournamentDialog extends MageDialog {
// join AI
for (TournamentPlayerPanel player : players) {
if (player.getPlayerType().getSelectedItem() != PlayerType.HUMAN) {
// TODO: add support of multiple deck files per each computer player (can be implemented after combine table/tourney dialog in one)
if (!player.joinTournamentTable(roomId, table.getTableId(), DeckImporter.importDeckFromFile(this.player1Panel.getDeckFile(), true))) {
// error message must be send by sever
SessionHandler.removeTable(roomId, table.getTableId());
@ -737,7 +748,6 @@ public class NewTournamentDialog extends MageDialog {
}//GEN-LAST:event_btnCancelActionPerformed
private void updateNumSeats() {
// int numPlayers = (Integer) this.spnNumPlayers.getValue();
int numSeats = (Integer) this.spnNumSeats.getValue();
if (numSeats > 2) {
@ -756,7 +766,7 @@ public class NewTournamentDialog extends MageDialog {
}
private void spnNumPlayersStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spnNumPlayersStateChanged
int numPlayers = (Integer) this.spnNumPlayers.getValue();
int numPlayers = getCurrentNumPlayers();
createPlayers(numPlayers - 1);
int numSeats = (Integer) this.spnNumSeats.getValue();
if (numSeats > 2 && numPlayers != numSeats) {
@ -771,8 +781,7 @@ public class NewTournamentDialog extends MageDialog {
}//GEN-LAST:event_spnNumSeatsStateChanged
private void spnNumWinsnumPlayersChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spnNumWinsnumPlayersChanged
int numSeats = (Integer) this.spnNumSeats.getValue();
int numWins = (Integer) this.spnNumSeats.getValue();
int numSeats = getCurrentNumSeats();
if (numSeats > 2) {
spnNumWins.setValue(1);
}
@ -878,32 +887,47 @@ public class NewTournamentDialog extends MageDialog {
}//GEN-LAST:event_btnCustomOptionsActionPerformed
private void setGameOptions() {
GameTypeView gameType = (GameTypeView) cbGameType.getSelectedItem();
// int oldValue = (Integer) this.spnNumPlayers.getValue();
// this.spnNumPlayers.setModel(new SpinnerNumberModel(gameType.getMinPlayers(), gameType.getMinPlayers(), gameType.getMaxPlayers(), 1));
// this.spnNumPlayers.setEnabled(gameType.getMinPlayers() != gameType.getMaxPlayers());
// if (oldValue >= gameType.getMinPlayers() && oldValue <= gameType.getMaxPlayers()){
// this.spnNumPlayers.setBoostedValue(oldValue);
// }
// this.cbAttackOption.setEnabled(gameType.isUseAttackOption());
// this.cbRange.setEnabled(gameType.isUseRange());
createPlayers((Integer) spnNumPlayers.getValue() - 1);
createPlayers(getCurrentNumPlayers() - 1);
}
private void prepareTourneyView(int numPlayers) {
private void prepareTourneyView(boolean loadPlayerSettings, String versionStr, int numPlayers, int numSeats) {
TournamentTypeView tournamentType = (TournamentTypeView) cbTournamentType.getSelectedItem();
activatePanelElements(tournamentType);
// players
if (numPlayers < tournamentType.getMinPlayers() || numPlayers > tournamentType.getMaxPlayers()) {
numPlayers = tournamentType.getMinPlayers();
createPlayers(numPlayers - 1); // ?
}
this.spnNumPlayers.setModel(new SpinnerNumberModel(numPlayers, tournamentType.getMinPlayers(), tournamentType.getMaxPlayers(), 1));
this.spnNumPlayers.setEnabled(tournamentType.getMinPlayers() != tournamentType.getMaxPlayers());
createPlayers((Integer) spnNumPlayers.getValue() - 1);
this.spnNumSeats.setModel(new SpinnerNumberModel(2, 2, tournamentType.getMaxPlayers(), 1));
// manual call change events to apply players/seats restrictions and create miss panels
// TODO: refactor to use isLoading and restrictions from a code instead restrictions from a component
this.spnNumPlayers.setValue(numPlayers);
spnNumPlayersStateChanged(null);
this.spnNumSeats.setValue(numSeats);
spnNumSeatsStateChanged(null);
if (loadPlayerSettings) {
// load player data
// player type
String playerData = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLAYER_TYPES + versionStr, "Human");
prefPlayerTypes.clear();
for (String playerTypeStr : playerData.split(NewTableDialog.PLAYER_DATA_DELIMETER_NEW)) {
prefPlayerTypes.add(PlayerType.getByDescription(playerTypeStr));
}
// player skill
playerData = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLAYER_SKILLS + versionStr, String.valueOf(NewTableDialog.DEFAULT_COMPUTER_PLAYER_SKILL_LEVEL));
prefPlayerSkills.clear();
for (String playerSkillStr : playerData.split(NewTableDialog.PLAYER_DATA_DELIMETER_NEW)) {
prefPlayerSkills.add(Integer.parseInt(playerSkillStr));
}
// player deck
// no deck files support here yet (single deck for all computers)
}
createPlayers(numPlayers - 1);
// packs
preparePacksView(tournamentType);
}
@ -921,10 +945,10 @@ public class NewTournamentDialog extends MageDialog {
}
}
private void setNumberOfSwissRoundsMin(int numPlayers) {
private void setNumberOfSwissRoundsMin(int additionalNumPlayers) {
// set 3 rounds default if more than 4 players
// don't set 4 rounds by default, as 3 rounds generally preferred
int minRounds = (numPlayers + 1 > 4) ? 3 : 2;
int minRounds = (additionalNumPlayers + 1 > 4) ? 3 : 2;
int newValue = Math.max((Integer) spnNumRounds.getValue(), minRounds);
this.spnNumRounds.setModel(new SpinnerNumberModel(newValue, 2, 10, 1));
this.pack();
@ -1136,24 +1160,46 @@ public class NewTournamentDialog extends MageDialog {
}
}
private void createPlayers(int numPlayers) {
// add/remove player panels
if (numPlayers > players.size()) {
while (players.size() != numPlayers) {
private void createPlayers(int additionalNumPlayers) {
// add miss panels
if (additionalNumPlayers > players.size()) {
while (players.size() != additionalNumPlayers) {
TournamentPlayerPanel playerPanel = new TournamentPlayerPanel();
playerPanel.init(players.size() + 2);
players.add(playerPanel);
}
} else if (numPlayers < players.size()) {
while (players.size() != numPlayers) {
}
// remove un-used panels
if (additionalNumPlayers < players.size()) {
while (players.size() != additionalNumPlayers) {
players.remove(players.size() - 1);
}
}
// load player data
for (int i = 0; i < players.size(); i++) {
TournamentPlayerPanel playerPanel = players.get(i);
// find player type
PlayerType playerType = PlayerType.HUMAN;
if (i < prefPlayerTypes.size()) {
playerType = prefPlayerTypes.get(i);
}
// find skill level
int playerSkill = NewTableDialog.DEFAULT_COMPUTER_PLAYER_SKILL_LEVEL;
if (i < prefPlayerSkills.size()) {
playerSkill = prefPlayerSkills.get(i);
}
// find deck file
// no deck files support here yet (single deck for all computers)
playerPanel.init(i + 2, playerType, playerSkill);
}
drawPlayers();
setNumberOfSwissRoundsMin(numPlayers);
setNumberOfSwissRoundsMin(additionalNumPlayers);
}
private void drawPlayers() {
@ -1347,7 +1393,6 @@ public class NewTournamentDialog extends MageDialog {
private void onLoadSettings(int version) {
String versionStr = prepareVersionStr(version, false);
int numPlayers;
txtName.setText(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_NAME + versionStr, "Tournament"));
txtPassword.setText(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PASSWORD + versionStr, ""));
int timeLimit = Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_TIME_LIMIT + versionStr, "1500"));
@ -1365,7 +1410,7 @@ public class NewTournamentDialog extends MageDialog {
break;
}
}
String skillLevelDefault = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_SKILL_LEVEL + versionStr, "Casual");
String skillLevelDefault = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_SKILL_LEVEL + versionStr, "Casual");
for (SkillLevel skillLevel : SkillLevel.values()) {
if (skillLevel.toString().equals(skillLevelDefault)) {
this.cbSkillLevel.setSelectedItem(skillLevel);
@ -1391,11 +1436,11 @@ public class NewTournamentDialog extends MageDialog {
TournamentTypeView tournamentType = (TournamentTypeView) cbTournamentType.getSelectedItem();
activatePanelElements(tournamentType);
int defaultNumberPlayers = 2;
int defaultNumberSeats = 2;
if (tournamentType.isLimited()) {
if (tournamentType.isDraft()) {
numPlayers = Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLAYERS_DRAFT + versionStr, "4"));
prepareTourneyView(numPlayers);
defaultNumberPlayers = 4;
if (tournamentType.isRandom() || tournamentType.isRichMan() || tournamentType.isReshuffled()) {
loadRandomPacks(version);
} else {
@ -1410,8 +1455,6 @@ public class NewTournamentDialog extends MageDialog {
}
}
} else {
numPlayers = Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLAYERS_SEALED + versionStr, "2"));
prepareTourneyView(numPlayers);
loadBoosterPacks(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PACKS_SEALED + versionStr, ""));
}
}
@ -1419,6 +1462,15 @@ public class NewTournamentDialog extends MageDialog {
this.chkRollbackTurnsAllowed.setSelected(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_ALLOW_ROLLBACKS + versionStr, "Yes").equals("Yes"));
this.chkRated.setSelected(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_RATED + versionStr, "No").equals("Yes"));
String deckFile = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_DECK_FILE + versionStr, "");
if (deckFile != null && !deckFile.isEmpty() && new File(deckFile).exists()) {
this.player1Panel.setDeckFile(deckFile);
}
int numPlayers = Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_NUMBER_PLAYERS + versionStr, String.valueOf(defaultNumberPlayers)));
int numSeats = Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_NUMBER_SEATS + versionStr, String.valueOf(defaultNumberSeats)));
prepareTourneyView(true, versionStr, numPlayers, numSeats);
this.customOptions.onLoadSettings(version);
}
@ -1443,20 +1495,14 @@ public class NewTournamentDialog extends MageDialog {
if (tOptions.getTournamentType().startsWith("Sealed")) {
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PACKS_SEALED + versionStr, tOptions.getLimitedOptions().getSetCodes().toString());
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLAYERS_SEALED + versionStr, Integer.toString(tOptions.getPlayerTypes().size()));
}
if (tOptions.getTournamentType().startsWith("Booster")) {
DraftOptions draftOptions = (DraftOptions) tOptions.getLimitedOptions();
if (draftOptions != null) {
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PACKS_DRAFT + versionStr, draftOptions.getSetCodes().toString());
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLAYERS_DRAFT + versionStr, Integer.toString(tOptions.getPlayerTypes().size()));
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_DRAFT_TIMING + versionStr, draftOptions.getTiming().name());
}
String deckFile = this.player1Panel.getDeckFile();
if (deckFile != null && !deckFile.isEmpty()) {
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_DECK_FILE + versionStr, deckFile);
}
if (tOptions.getLimitedOptions().getIsRandom() || tOptions.getLimitedOptions().getIsRichMan() || tOptions.getLimitedOptions().getIsReshuffled()) {
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PACKS_RANDOM_DRAFT + versionStr, String.join(";", this.randomPackSelector.getSelectedPacks()));
}
@ -1464,6 +1510,30 @@ public class NewTournamentDialog extends MageDialog {
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_ALLOW_SPECTATORS + versionStr, (tOptions.isWatchingAllowed() ? "Yes" : "No"));
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_ALLOW_ROLLBACKS + versionStr, (tOptions.getMatchOptions().isRollbackTurnsAllowed() ? "Yes" : "No"));
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_RATED + versionStr, (tOptions.getMatchOptions().isRated() ? "Yes" : "No"));
String deckFile = this.player1Panel.getDeckFile();
if (deckFile != null && !deckFile.isEmpty()) {
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_DECK_FILE + versionStr, deckFile);
}
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_NUMBER_PLAYERS + versionStr, Integer.toString(tOptions.getPlayerTypes().size()));
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_NUMBER_SEATS + versionStr, Integer.toString((Integer) this.spnNumSeats.getValue()));
// save player data
// player type
String playerData = players.stream()
.map(panel -> ((PlayerType) panel.getPlayerType().getSelectedItem()))
.map(panel -> panel.toString())
.collect(Collectors.joining(NewTableDialog.PLAYER_DATA_DELIMETER_NEW));
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLAYER_TYPES + versionStr, playerData);
// player skill
playerData = players.stream()
.map(panel -> String.valueOf(panel.getPlayerSkill()))
.collect(Collectors.joining(NewTableDialog.PLAYER_DATA_DELIMETER_NEW));
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLAYER_SKILLS + versionStr, playerData);
// player deck
// no deck files support here yet (single deck for all computers)
customOptions.onSaveSettings(version, tOptions.getMatchOptions());
}

View file

@ -233,6 +233,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
public static final String KEY_NEW_TOURNAMENT_TIME_LIMIT = "newTournamentTimeLimit";
public static final String KEY_NEW_TOURNAMENT_BUFFER_TIME = "newTournamentBufferTime";
public static final String KEY_NEW_TOURNAMENT_CONSTR_TIME = "newTournamentConstructionTime";
public static final String KEY_NEW_TOURNAMENT_SKILL_LEVEL = "newTournamentSkillLevel";
public static final String KEY_NEW_TOURNAMENT_TYPE = "newTournamentType";
public static final String KEY_NEW_TOURNAMENT_NUMBER_OF_FREE_MULLIGANS = "newTournamentNumberOfFreeMulligans";
public static final String KEY_NEW_TOURNAMENT_MULLIGUN_TYPE = "newTournamentMulliganType";
@ -244,8 +245,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
public static final String KEY_NEW_TOURNAMENT_PACKS_SEALED = "newTournamentPacksSealed";
public static final String KEY_NEW_TOURNAMENT_PACKS_DRAFT = "newTournamentPacksDraft";
public static final String KEY_NEW_TOURNAMENT_PACKS_RANDOM_DRAFT = "newTournamentPacksRandomDraft";
public static final String KEY_NEW_TOURNAMENT_PLAYERS_SEALED = "newTournamentPlayersSealed";
public static final String KEY_NEW_TOURNAMENT_PLAYERS_DRAFT = "newTournamentPlayersDraft";
public static final String KEY_NEW_TOURNAMENT_NUMBER_PLAYERS = "newTournamentNumberPlayers";
public static final String KEY_NEW_TOURNAMENT_NUMBER_SEATS = "newTournamentNumberSeats";
public static final String KEY_NEW_TOURNAMENT_PLAYER_TYPES = "newTournamentPlayerTypes";
public static final String KEY_NEW_TOURNAMENT_PLAYER_SKILLS = "newTournamentPlayerSkills";
public static final String KEY_NEW_TOURNAMENT_DRAFT_TIMING = "newTournamentDraftTiming";
public static final String KEY_NEW_TOURNAMENT_ALLOW_SPECTATORS = "newTournamentAllowSpectators";
public static final String KEY_NEW_TOURNAMENT_PLANE_CHASE = "newTournamentPlaneChase";

View file

@ -17,19 +17,12 @@ public class NewPlayerPanel extends javax.swing.JPanel {
private final JFileChooser fcSelectDeck;
/**
* Creates new form NewPlayerPanel
*/
public NewPlayerPanel() {
initComponents();
fcSelectDeck = new JFileChooser();
fcSelectDeck.setAcceptAllFileFilterUsed(false);
fcSelectDeck.addChoosableFileFilter(new DeckFileFilter("dck", "XMage's deck files (*.dck)"));
String deckPath = MageFrame.getPreferences().get("defaultDeckPath", "");
if (deckPath.isEmpty()) {
deckPath = ClientDefaultSettings.deckPath;
}
this.txtPlayerDeck.setText(deckPath);
this.txtPlayerDeck.setText("");
this.txtPlayerName.setText(ClientDefaultSettings.computerName);
}
@ -62,7 +55,6 @@ public class NewPlayerPanel extends javax.swing.JPanel {
return;
}
this.txtPlayerDeck.setText(path);
MageFrame.getPreferences().put("defaultDeckPath", path);
}
public String getPlayerName() {

View file

@ -39,7 +39,6 @@ public class TablePlayerPanel extends javax.swing.JPanel {
}
this.newPlayerPanel.setDeckFile(playerDeck);
this.newPlayerPanel.setSkillLevel(playerSkill);
}
public boolean joinTable(UUID roomId, UUID tableId) throws IOException, ClassNotFoundException {

View file

@ -22,15 +22,31 @@ public class TournamentPlayerPanel extends javax.swing.JPanel {
this.pnlPlayerName.setVisible(false);
}
public void init(int playerNum) {
public void init(int playerNum, PlayerType playerType, int playerSkill) {
cbPlayerType.setModel(new DefaultComboBoxModel(SessionHandler.getPlayerTypes()));
this.lblPlayerNum.setText("Player " + playerNum);
if (ClientDefaultSettings.otherPlayerIndex != null) {
Integer index = Integer.parseInt(ClientDefaultSettings.otherPlayerIndex);
if (index >= cbPlayerType.getItemCount()) {
cbPlayerType.setSelectedIndex(cbPlayerType.getItemCount() - 1);
} else {
cbPlayerType.setSelectedIndex(index);
}
}
if (playerType != null) {
this.cbPlayerType.setSelectedItem(playerType);
}
this.spnLevel.setValue(playerSkill);
}
public JComboBox getPlayerType() {
return this.cbPlayerType;
}
public int getPlayerSkill() {
return (Integer) this.spnLevel.getValue();
}
public boolean joinTournamentTable(UUID roomId, UUID tableId, DeckCardLists deckCardLists) {
if (this.cbPlayerType.getSelectedItem() != PlayerType.HUMAN) {
return SessionHandler.joinTournamentTable(

View file

@ -15,7 +15,6 @@ public final class ClientDefaultSettings {
public static final CardDimensions dimensions;
public static final CardDimensions dimensionsEnlarged;
public static final String deckPath;
public static final String otherPlayerIndex;
public static final String computerName;
@ -26,7 +25,6 @@ public final class ClientDefaultSettings {
cardScalingFactor = 0.4;
cardScalingFactorEnlarged = 0.5;
handScalingFactor = 1.3;
deckPath = "";
otherPlayerIndex = "1"; // combobox default, example: 0: Human, 1: Computer - mad, 2: Computer - Draft Bot
computerName = "Computer";
dimensions = new CardDimensions(cardScalingFactor);