1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-06 01:04:10 -09:00

* Added Momir Basic format to table filtering so Momir Basic games are shown.

This commit is contained in:
LevelX2 2015-11-14 19:07:48 +01:00
parent 5262d8d358
commit 79c04eef47
2 changed files with 79 additions and 73 deletions
Mage.Client/src/main/java/mage/client

View file

@ -1,30 +1,30 @@
/* /*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, are * Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met: * permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this list of * 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer. * conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list * 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials * of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution. * provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* The views and conclusions contained in the software and documentation are those of the * The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.client.dialog; package mage.client.dialog;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
@ -71,7 +71,9 @@ public class NewTableDialog extends MageDialog {
private static final String LIMITED = "Limited"; private static final String LIMITED = "Limited";
/** Creates new form NewTableDialog */ /**
* Creates new form NewTableDialog
*/
public NewTableDialog() { public NewTableDialog() {
session = MageFrame.getSession(); session = MageFrame.getSession();
lastSessionId = ""; lastSessionId = "";
@ -79,13 +81,13 @@ public class NewTableDialog extends MageDialog {
player1Panel.showLevel(false); player1Panel.showLevel(false);
this.spnNumWins.setModel(new SpinnerNumberModel(1, 1, 5, 1)); this.spnNumWins.setModel(new SpinnerNumberModel(1, 1, 5, 1));
this.spnFreeMulligans.setModel(new SpinnerNumberModel(0, 0, 5, 1)); this.spnFreeMulligans.setModel(new SpinnerNumberModel(0, 0, 5, 1));
MageFrame.getUI().addButton(MageComponents.NEW_TABLE_OK_BUTTON, btnOK); MageFrame.getUI().addButton(MageComponents.NEW_TABLE_OK_BUTTON, btnOK);
} }
/** This method is called from within the constructor to /**
* initialize the form. * This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is * WARNING: Do NOT modify this code. The content of this method is always
* always regenerated by the Form Editor. * regenerated by the Form Editor.
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
@ -361,7 +363,7 @@ public class NewTableDialog extends MageDialog {
GameTypeView gameType = (GameTypeView) cbGameType.getSelectedItem(); GameTypeView gameType = (GameTypeView) cbGameType.getSelectedItem();
MatchOptions options = new MatchOptions(this.txtName.getText(), gameType.getName()); MatchOptions options = new MatchOptions(this.txtName.getText(), gameType.getName());
options.getPlayerTypes().add("Human"); options.getPlayerTypes().add("Human");
for (TablePlayerPanel player: players) { for (TablePlayerPanel player : players) {
options.getPlayerTypes().add(player.getPlayerType()); options.getPlayerTypes().add(player.getPlayerType());
} }
options.setDeckType((String) this.cbDeckType.getSelectedItem()); options.setDeckType((String) this.cbDeckType.getSelectedItem());
@ -370,9 +372,9 @@ public class NewTableDialog extends MageDialog {
options.setAttackOption((MultiplayerAttackOption) this.cbAttackOption.getSelectedItem()); options.setAttackOption((MultiplayerAttackOption) this.cbAttackOption.getSelectedItem());
options.setSkillLevel((SkillLevel) this.cbSkillLevel.getSelectedItem()); options.setSkillLevel((SkillLevel) this.cbSkillLevel.getSelectedItem());
options.setRange((RangeOfInfluence) this.cbRange.getSelectedItem()); options.setRange((RangeOfInfluence) this.cbRange.getSelectedItem());
options.setWinsNeeded((Integer)this.spnNumWins.getValue()); options.setWinsNeeded((Integer) this.spnNumWins.getValue());
options.setRollbackTurnsAllowed(chkRollbackTurnsAllowed.isSelected()); options.setRollbackTurnsAllowed(chkRollbackTurnsAllowed.isSelected());
options.setFreeMulligans((Integer)this.spnFreeMulligans.getValue()); options.setFreeMulligans((Integer) this.spnFreeMulligans.getValue());
options.setPassword(this.txtPassword.getText()); options.setPassword(this.txtPassword.getText());
if (!checkMatchOptions(options)) { if (!checkMatchOptions(options)) {
return; return;
@ -391,9 +393,8 @@ public class NewTableDialog extends MageDialog {
this.player1Panel.getPlayerName(), this.player1Panel.getPlayerName(),
"Human", 1, "Human", 1,
DeckImporterUtil.importDeck(this.player1Panel.getDeckFile()), DeckImporterUtil.importDeck(this.player1Panel.getDeckFile()),
this.txtPassword.getText()) this.txtPassword.getText())) {
) { for (TablePlayerPanel player : players) {
for (TablePlayerPanel player: players) {
if (!player.getPlayerType().equals("Human")) { if (!player.getPlayerType().equals("Human")) {
if (!player.joinTable(roomId, table.getTableId())) { if (!player.joinTable(roomId, table.getTableId())) {
// error message must be send by the server // error message must be send by the server
@ -423,7 +424,7 @@ public class NewTableDialog extends MageDialog {
}//GEN-LAST:event_cbGameTypeActionPerformed }//GEN-LAST:event_cbGameTypeActionPerformed
private void numPlayersChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_numPlayersChanged private void numPlayersChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_numPlayersChanged
int numPlayers = (Integer)this.spnNumPlayers.getValue() - 1; int numPlayers = (Integer) this.spnNumPlayers.getValue() - 1;
createPlayers(numPlayers); createPlayers(numPlayers);
}//GEN-LAST:event_numPlayersChanged }//GEN-LAST:event_numPlayersChanged
@ -432,9 +433,10 @@ public class NewTableDialog extends MageDialog {
}//GEN-LAST:event_spnNumWinsnumPlayersChanged }//GEN-LAST:event_spnNumWinsnumPlayersChanged
/** /**
* Checks about not valid game option combinations and shows an error message * Checks about not valid game option combinations and shows an error
* * message
* @return *
* @return
*/ */
private boolean checkMatchOptions(MatchOptions options) { private boolean checkMatchOptions(MatchOptions options) {
switch (options.getDeckType()) { switch (options.getDeckType()) {
@ -451,11 +453,17 @@ public class NewTableDialog extends MageDialog {
return false; return false;
} }
break; break;
case "Variant Magic - Momir Basic":
if (!options.getGameType().startsWith("Momir Basic")) {
JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Deck type Momir Basic needs also a Momir Basic game type", "Error", JOptionPane.ERROR_MESSAGE);
return false;
}
break;
} }
switch (options.getGameType()) { switch (options.getGameType()) {
case "Commander Two Player Duel": case "Commander Two Player Duel":
case "Commander Free For All": case "Commander Free For All":
if (!options.getDeckType().equals("Variant Magic - Commander") && !options.getDeckType().equals("Variant Magic - Duel Commander") ) { if (!options.getDeckType().equals("Variant Magic - Commander") && !options.getDeckType().equals("Variant Magic - Duel Commander")) {
JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Deck type Commander needs also a Commander game type", "Error", JOptionPane.ERROR_MESSAGE); JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Deck type Commander needs also a Commander game type", "Error", JOptionPane.ERROR_MESSAGE);
return false; return false;
} }
@ -466,16 +474,16 @@ public class NewTableDialog extends MageDialog {
return false; return false;
} }
break; break;
} }
return true; return true;
} }
private void setGameOptions() { private void setGameOptions() {
GameTypeView gameType = (GameTypeView) cbGameType.getSelectedItem(); GameTypeView gameType = (GameTypeView) cbGameType.getSelectedItem();
int oldValue = (Integer) this.spnNumPlayers.getValue(); int oldValue = (Integer) this.spnNumPlayers.getValue();
this.spnNumPlayers.setModel(new SpinnerNumberModel(gameType.getMinPlayers(), gameType.getMinPlayers(), gameType.getMaxPlayers(), 1)); this.spnNumPlayers.setModel(new SpinnerNumberModel(gameType.getMinPlayers(), gameType.getMinPlayers(), gameType.getMaxPlayers(), 1));
this.spnNumPlayers.setEnabled(gameType.getMinPlayers() != gameType.getMaxPlayers()); this.spnNumPlayers.setEnabled(gameType.getMinPlayers() != gameType.getMaxPlayers());
if (oldValue >= gameType.getMinPlayers() && oldValue <= gameType.getMaxPlayers()){ if (oldValue >= gameType.getMinPlayers() && oldValue <= gameType.getMaxPlayers()) {
this.spnNumPlayers.setValue(oldValue); this.spnNumPlayers.setValue(oldValue);
} }
this.cbAttackOption.setEnabled(gameType.isUseAttackOption()); this.cbAttackOption.setEnabled(gameType.isUseAttackOption());
@ -495,17 +503,16 @@ public class NewTableDialog extends MageDialog {
playerPanel.init(players.size() + 2, playerType); playerPanel.init(players.size() + 2, playerType);
players.add(playerPanel); players.add(playerPanel);
playerPanel.addPlayerTypeEventListener( playerPanel.addPlayerTypeEventListener(
new Listener<Event> () { new Listener<Event>() {
@Override @Override
public void event(Event event) { public void event(Event event) {
drawPlayers(); drawPlayers();
}
} }
}
); );
} }
} } // remove player panels no longer needed
// remove player panels no longer needed
else if (numPlayers < players.size()) { else if (numPlayers < players.size()) {
while (players.size() != numPlayers) { while (players.size() != numPlayers) {
players.remove(players.size() - 1); players.remove(players.size() - 1);
@ -516,7 +523,7 @@ public class NewTableDialog extends MageDialog {
private void drawPlayers() { private void drawPlayers() {
this.pnlOtherPlayers.removeAll(); this.pnlOtherPlayers.removeAll();
for (TablePlayerPanel panel: players) { for (TablePlayerPanel panel : players) {
this.pnlOtherPlayers.add(panel); this.pnlOtherPlayers.add(panel);
} }
this.pack(); this.pack();
@ -531,7 +538,7 @@ public class NewTableDialog extends MageDialog {
} }
public void showDialog(UUID roomId) { public void showDialog(UUID roomId) {
this.roomId = roomId; this.roomId = roomId;
if (!lastSessionId.equals(MageFrame.getSession().getSessionId())) { if (!lastSessionId.equals(MageFrame.getSession().getSessionId())) {
lastSessionId = session.getSessionId(); lastSessionId = session.getSessionId();
this.player1Panel.setPlayerName(session.getUserName()); this.player1Panel.setPlayerName(session.getUserName());
@ -543,8 +550,8 @@ public class NewTableDialog extends MageDialog {
cbAttackOption.setModel(new DefaultComboBoxModel(MultiplayerAttackOption.values())); cbAttackOption.setModel(new DefaultComboBoxModel(MultiplayerAttackOption.values()));
cbSkillLevel.setModel(new DefaultComboBoxModel(SkillLevel.values())); cbSkillLevel.setModel(new DefaultComboBoxModel(SkillLevel.values()));
// Update the existing player panels (neccessary if server was changes = new session) // Update the existing player panels (neccessary if server was changes = new session)
int i=2; int i = 2;
for (TablePlayerPanel tablePlayerPanel :players) { for (TablePlayerPanel tablePlayerPanel : players) {
tablePlayerPanel.init(i++, tablePlayerPanel.getPlayerType()); tablePlayerPanel.init(i++, tablePlayerPanel.getPlayerType());
} }
setGameSettingsFromPrefs(); setGameSettingsFromPrefs();
@ -565,7 +572,7 @@ public class NewTableDialog extends MageDialog {
private void selectLimitedByDefault() { private void selectLimitedByDefault() {
for (int i = 0; i < cbDeckType.getItemCount(); i++) { for (int i = 0; i < cbDeckType.getItemCount(); i++) {
String name = (String)cbDeckType.getItemAt(i); String name = (String) cbDeckType.getItemAt(i);
if (name.equals(LIMITED)) { if (name.equals(LIMITED)) {
cbDeckType.setSelectedIndex(i); cbDeckType.setSelectedIndex(i);
break; break;
@ -574,9 +581,9 @@ public class NewTableDialog extends MageDialog {
} }
/** /**
* set the table settings from java prefs * set the table settings from java prefs
*/ */
private void setGameSettingsFromPrefs () { private void setGameSettingsFromPrefs() {
txtName.setText(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_NAME, "Game")); txtName.setText(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_NAME, "Game"));
txtPassword.setText(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_PASSWORD, "")); txtPassword.setText(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_PASSWORD, ""));
@ -585,7 +592,6 @@ public class NewTableDialog extends MageDialog {
prefPlayerTypes.addAll(Arrays.asList(playerTypes.split(","))); prefPlayerTypes.addAll(Arrays.asList(playerTypes.split(",")));
this.spnNumPlayers.setValue(Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_PLAYERS, "2"))); this.spnNumPlayers.setValue(Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_PLAYERS, "2")));
String gameTypeName = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_GAME_TYPE, "Two Player Duel"); String gameTypeName = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_GAME_TYPE, "Two Player Duel");
for (GameTypeView gtv : session.getGameTypes()) { for (GameTypeView gtv : session.getGameTypes()) {
if (gtv.getName().equals(gameTypeName)) { if (gtv.getName().equals(gameTypeName)) {
@ -594,7 +600,7 @@ public class NewTableDialog extends MageDialog {
} }
} }
int timeLimit = Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_TIME_LIMIT, "1500")); int timeLimit = Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_TIME_LIMIT, "1500"));
for (MatchTimeLimit mtl :MatchTimeLimit.values()) { for (MatchTimeLimit mtl : MatchTimeLimit.values()) {
if (mtl.getTimeLimit() == timeLimit) { if (mtl.getTimeLimit() == timeLimit) {
this.cbTimeLimit.setSelectedItem(mtl); this.cbTimeLimit.setSelectedItem(mtl);
break; break;
@ -608,32 +614,32 @@ public class NewTableDialog extends MageDialog {
this.spnNumWins.setValue(Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_OF_WINS, "2"))); this.spnNumWins.setValue(Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_OF_WINS, "2")));
this.chkRollbackTurnsAllowed.setSelected(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_ROLLBACK_TURNS_ALLOWED, "Yes").equals("Yes")); this.chkRollbackTurnsAllowed.setSelected(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_ROLLBACK_TURNS_ALLOWED, "Yes").equals("Yes"));
int range = Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_RANGE, "1")); int range = Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_RANGE, "1"));
for (RangeOfInfluence roi :RangeOfInfluence.values()) { for (RangeOfInfluence roi : RangeOfInfluence.values()) {
if (roi.getRange() == range) { if (roi.getRange() == range) {
this.cbRange.setSelectedItem(roi); this.cbRange.setSelectedItem(roi);
break; break;
} }
} }
String attackOption = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_ATTACK_OPTION, "Attack Multiple Players"); String attackOption = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_ATTACK_OPTION, "Attack Multiple Players");
for (MultiplayerAttackOption mao :MultiplayerAttackOption.values()) { for (MultiplayerAttackOption mao : MultiplayerAttackOption.values()) {
if (mao.toString().equals(attackOption)) { if (mao.toString().equals(attackOption)) {
this.cbAttackOption.setSelectedItem(mao); this.cbAttackOption.setSelectedItem(mao);
break; break;
} }
} }
String skillLevelDefault = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_SKILL_LEVEL, "Casual"); String skillLevelDefault = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_SKILL_LEVEL, "Casual");
for (SkillLevel skillLevel :SkillLevel.values()) { for (SkillLevel skillLevel : SkillLevel.values()) {
if (skillLevel.toString().equals(skillLevelDefault)) { if (skillLevel.toString().equals(skillLevelDefault)) {
this.cbSkillLevel.setSelectedItem(skillLevel); this.cbSkillLevel.setSelectedItem(skillLevel);
break; break;
} }
} }
} }
/** /**
* Save the settings to java prefs to reload it next time the dialog will be created * Save the settings to java prefs to reload it next time the dialog will be
* created
* *
* @param options * @param options
* @param deckFile * @param deckFile
@ -645,7 +651,7 @@ public class NewTableDialog extends MageDialog {
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_TIME_LIMIT, Integer.toString(options.getPriorityTime())); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_TIME_LIMIT, Integer.toString(options.getPriorityTime()));
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_GAME_TYPE, options.getGameType()); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_GAME_TYPE, options.getGameType());
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_OF_WINS, Integer.toString(options.getWinsNeeded())); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_OF_WINS, Integer.toString(options.getWinsNeeded()));
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_ROLLBACK_TURNS_ALLOWED, options.isRollbackTurnsAllowed() ? "Yes": "No"); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_ROLLBACK_TURNS_ALLOWED, options.isRollbackTurnsAllowed() ? "Yes" : "No");
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_OF_FREE_MULLIGANS, Integer.toString(options.getFreeMulligans())); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_OF_FREE_MULLIGANS, Integer.toString(options.getFreeMulligans()));
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_DECK_FILE, deckFile); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_DECK_FILE, deckFile);
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_PLAYERS, spnNumPlayers.getValue().toString()); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_PLAYERS, spnNumPlayers.getValue().toString());
@ -655,7 +661,7 @@ public class NewTableDialog extends MageDialog {
StringBuilder playerTypesString = new StringBuilder(); StringBuilder playerTypesString = new StringBuilder();
ListIterator iterator = players.listIterator(); ListIterator iterator = players.listIterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
if (playerTypesString.length()>0) { if (playerTypesString.length() > 0) {
playerTypesString.append(","); playerTypesString.append(",");
} }
TablePlayerPanel tpp = (TablePlayerPanel) iterator.next(); TablePlayerPanel tpp = (TablePlayerPanel) iterator.next();

View file

@ -501,7 +501,7 @@ public class TablesPanel extends javax.swing.JPanel {
// type // type
List<RowFilter<Object, Object>> typeFilterList = new ArrayList<>(); List<RowFilter<Object, Object>> typeFilterList = new ArrayList<>();
if (btnTypeMatch.isSelected()) { if (btnTypeMatch.isSelected()) {
typeFilterList.add(RowFilter.regexFilter("Two|Commander|Free|Tiny", TableTableModel.COLUMN_GAME_TYPE)); typeFilterList.add(RowFilter.regexFilter("Two|Commander|Free|Tiny|Momir", TableTableModel.COLUMN_GAME_TYPE));
} }
if (btnTypeTourneyConstructed.isSelected()) { if (btnTypeTourneyConstructed.isSelected()) {
typeFilterList.add(RowFilter.regexFilter("Constructed", TableTableModel.COLUMN_GAME_TYPE)); typeFilterList.add(RowFilter.regexFilter("Constructed", TableTableModel.COLUMN_GAME_TYPE));
@ -537,7 +537,7 @@ public class TablesPanel extends javax.swing.JPanel {
formatFilterList.add(RowFilter.regexFilter("^Limited", TableTableModel.COLUMN_DECK_TYPE)); formatFilterList.add(RowFilter.regexFilter("^Limited", TableTableModel.COLUMN_DECK_TYPE));
} }
if (btnFormatOther.isSelected()) { if (btnFormatOther.isSelected()) {
formatFilterList.add(RowFilter.regexFilter("^Constructed - Pauper|^Constructed - Extended|^Constructed - Historical|^Constructed - Super", TableTableModel.COLUMN_DECK_TYPE)); formatFilterList.add(RowFilter.regexFilter("^Momir Basic|^Constructed - Pauper|^Constructed - Extended|^Constructed - Historical|^Constructed - Super", TableTableModel.COLUMN_DECK_TYPE));
} }
List<RowFilter<Object, Object>> skillFilterList = new ArrayList<>(); List<RowFilter<Object, Object>> skillFilterList = new ArrayList<>();