diff options
Diffstat (limited to 'src/jrummikub/control/SettingsControl.java')
-rw-r--r-- | src/jrummikub/control/SettingsControl.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/jrummikub/control/SettingsControl.java b/src/jrummikub/control/SettingsControl.java index 80b334a..6f4e149 100644 --- a/src/jrummikub/control/SettingsControl.java +++ b/src/jrummikub/control/SettingsControl.java @@ -24,11 +24,11 @@ import jrummikub.view.IView; * The settings control controls the settings panel */ public class SettingsControl { - private IView view; - private Event1<GameSettings> startGameEvent = new Event1<GameSettings>(); + protected IView view; + protected Event1<GameSettings> startGameEvent = new Event1<GameSettings>(); private List<Connection> connections = new ArrayList<Connection>(); - private GameSettings settings; + protected GameSettings settings; /** * Create a new settings control @@ -41,8 +41,6 @@ public class SettingsControl { public SettingsControl(IView view, GameSettings settings) { this.view = view; this.settings = settings; - addPlayer(); - addPlayer(); } /** @@ -59,6 +57,9 @@ public class SettingsControl { * Start the operation of the settings control */ public void startSettings() { + addPlayer(); + addPlayer(); + addPlayerSettingsListeners(); addOptionListeners1(); @@ -247,7 +248,7 @@ public class SettingsControl { update(); } - private void update() { + protected void update() { view.getSettingsPanel().enableRemovePlayerButtons( settings.getPlayerList().size() > 2); view.getSettingsPanel().enableAddPlayerButton( |