mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
adjust default 3 swiss rounds even in 10 player pods
This commit is contained in:
parent
eeffafcc62
commit
fe4a50e860
1 changed files with 3 additions and 2 deletions
|
|
@ -927,8 +927,9 @@ public class NewTournamentDialog extends MageDialog {
|
|||
}
|
||||
|
||||
private void setNumberOfSwissRoundsMin(int numPlayers) {
|
||||
// set the number of minimum swiss rounds related to the number of players
|
||||
int minRounds = (int) Math.ceil(Math.log(numPlayers + 1) / Math.log(2));
|
||||
// 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 newValue = Math.max((Integer) spnNumRounds.getValue(), minRounds);
|
||||
this.spnNumRounds.setModel(new SpinnerNumberModel(newValue, 2, 10, 1));
|
||||
this.pack();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue