summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control/SettingsControl.java
diff options
context:
space:
mode:
authorIda Massow <massow@informatik.uni-luebeck.de>2011-06-21 13:47:15 +0200
committerIda Massow <massow@informatik.uni-luebeck.de>2011-06-21 13:47:15 +0200
commit5e3ce21569f5adc92c969735c88af488cf581916 (patch)
tree08216e061937a4672fffefcf1054caadb92b568e /src/jrummikub/control/SettingsControl.java
parentfcd7af76285a58aa8e2ba645b8380c2c86f66908 (diff)
downloadJRummikub-5e3ce21569f5adc92c969735c88af488cf581916.tar
JRummikub-5e3ce21569f5adc92c969735c88af488cf581916.zip
Das reine control-package ist vollständig kommentiert
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@545 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/control/SettingsControl.java')
-rw-r--r--src/jrummikub/control/SettingsControl.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/jrummikub/control/SettingsControl.java b/src/jrummikub/control/SettingsControl.java
index 6576101..4675bc7 100644
--- a/src/jrummikub/control/SettingsControl.java
+++ b/src/jrummikub/control/SettingsControl.java
@@ -25,9 +25,9 @@ public class SettingsControl extends AbstractSettingsControl {
* Create a new settings control
*
* @param view
- * the view to use
+ * the view to use
* @param settings
- * initial game settings
+ * initial game settings
*/
public SettingsControl(IView view, GameSettings settings) {
super(view, settings);
@@ -48,8 +48,8 @@ public class SettingsControl extends AbstractSettingsControl {
}
/**
- * the start game event is emitted when the user wants to start a game and the
- * settings made are valid
+ * the start game event is emitted when the user wants to start a game and
+ * the settings made are valid
*
* @return the event
*/
@@ -96,8 +96,9 @@ public class SettingsControl extends AbstractSettingsControl {
view.getSettingsPanel().enableRemovePlayerButtons(
Collections.nCopies(settings.getPlayerList().size(),
enableRemoveButtons));
- view.getSettingsPanel().enableAddPlayerButton(
- settings.getPlayerList().size() < ISettingsPanel.PLAYER_COLORS.length);
+ view.getSettingsPanel()
+ .enableAddPlayerButton(
+ settings.getPlayerList().size() < ISettingsPanel.PLAYER_COLORS.length);
checkSettings();
@@ -109,6 +110,10 @@ public class SettingsControl extends AbstractSettingsControl {
view.getSettingsPanel().setGameSettings(settings);
}
+ /**
+ * Aborts the settings control and emits a start game event if settings have
+ * been approved
+ */
private void startGame() {
if (!checkSettings()) {
return;