From 81f12c3f45a9b1a5549e658c87763630859e5948 Mon Sep 17 00:00:00 2001 From: sprangg Date: Wed, 14 Apr 2021 08:54:29 +0300 Subject: [PATCH] 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 Co-authored-by: Oleg Agafonov --- .../src/main/java/mage/client/dialog/NewTournamentDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Client/src/main/java/mage/client/dialog/NewTournamentDialog.java b/Mage.Client/src/main/java/mage/client/dialog/NewTournamentDialog.java index 65c0a4d002..eaa9623baf 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/NewTournamentDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/NewTournamentDialog.java @@ -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();