mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
Add possibility to play less rounds of swiss than xmage suggests (#7729)
* Make it possible to adjust the number of rounds in a swiss tournament to be less than the number of rounds suggested by xmage. Co-authored-by: sprangg <a@b.c> Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
This commit is contained in:
parent
9128b5021c
commit
81f12c3f45
1 changed files with 1 additions and 1 deletions
|
@ -913,7 +913,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
// 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));
|
||||
int newValue = Math.max((Integer) spnNumRounds.getValue(), minRounds);
|
||||
this.spnNumRounds.setModel(new SpinnerNumberModel(newValue, minRounds, 10, 1));
|
||||
this.spnNumRounds.setModel(new SpinnerNumberModel(newValue, 2, 10, 1));
|
||||
this.pack();
|
||||
this.revalidate();
|
||||
this.repaint();
|
||||
|
|
Loading…
Reference in a new issue