mirror of
https://github.com/correl/mage.git
synced 2025-04-12 09:11:05 -09:00
Setting "Limited" deck type as default.
This commit is contained in:
parent
50df25489e
commit
881f162056
2 changed files with 14 additions and 1 deletions
Mage.Client/src/main/java/mage/client
|
@ -357,7 +357,7 @@ public class DeckGenerator {
|
|||
maxSingleCount = Math.max(maxSingleCount, typeCount);
|
||||
}
|
||||
}
|
||||
return 2 * converted + +3 * (10 - SINGLE_PENALTY[maxSingleCount]/*-DOUBLE_PENALTY[doubleCount]*/);
|
||||
return 2 * converted + 3 * (10 - SINGLE_PENALTY[maxSingleCount]/*-DOUBLE_PENALTY[doubleCount]*/);
|
||||
}
|
||||
|
||||
public int getScore() {
|
||||
|
|
|
@ -71,6 +71,8 @@ public class NewTableDialog extends MageDialog {
|
|||
private Session session;
|
||||
private List<TablePlayerPanel> players = new ArrayList<TablePlayerPanel>();
|
||||
|
||||
private static final String LIMITED = "Limited";
|
||||
|
||||
/** Creates new form NewTableDialog */
|
||||
public NewTableDialog() {
|
||||
initComponents();
|
||||
|
@ -376,6 +378,7 @@ public class NewTableDialog extends MageDialog {
|
|||
this.player1Panel.setPlayerName(session.getUserName());
|
||||
cbGameType.setModel(new DefaultComboBoxModel(session.getGameTypes().toArray()));
|
||||
cbDeckType.setModel(new DefaultComboBoxModel(session.getDeckTypes()));
|
||||
selectLimitedByDefault();
|
||||
cbRange.setModel(new DefaultComboBoxModel(RangeOfInfluence.values()));
|
||||
cbAttackOption.setModel(new DefaultComboBoxModel(MultiplayerAttackOption.values()));
|
||||
this.roomId = roomId;
|
||||
|
@ -392,6 +395,16 @@ public class NewTableDialog extends MageDialog {
|
|||
public UUID getPlayerId() {
|
||||
return playerId;
|
||||
}
|
||||
|
||||
private void selectLimitedByDefault() {
|
||||
for (int i = 0; i < cbDeckType.getItemCount(); i++) {
|
||||
String name = (String)cbDeckType.getItemAt(i);
|
||||
if (name.equals(LIMITED)) {
|
||||
cbDeckType.setSelectedIndex(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton btnCancel;
|
||||
|
|
Loading…
Add table
Reference in a new issue