diff options
Diffstat (limited to 'src/jrummikub/control/GameControl.java')
-rw-r--r-- | src/jrummikub/control/GameControl.java | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/jrummikub/control/GameControl.java b/src/jrummikub/control/GameControl.java index e00f136..d52b4ef 100644 --- a/src/jrummikub/control/GameControl.java +++ b/src/jrummikub/control/GameControl.java @@ -33,11 +33,11 @@ public class GameControl { * Constructor * * @param gameSettings - * the game settings + * the game settings * @param saveControl - * the save control + * the save control * @param view - * the view + * the view */ public GameControl(GameSettings gameSettings, SaveControl saveControl, IView view) { @@ -100,6 +100,14 @@ public class GameControl { startRound(); } + /** + * Continues game after loading + * + * @param gameState + * the saved GameState (Players, startplayer, points) + * @param roundState + * the saved RoundState (activePlayer, Table, heap etc) + */ public void continueGame(GameState gameState, IRoundState roundState) { this.gameState = gameState; if (roundState == null) { @@ -110,6 +118,11 @@ public class GameControl { } } + /** + * Clean abortion of a running game when another one is loaded or when a new + * one is started + * + */ public void abortGame() { removeListeners(); if (roundControl != null) { @@ -174,7 +187,8 @@ public class GameControl { view.getScorePanel().setPlayers(gameSettings.getPlayerList()); view.getScorePanel().setScores(gameState.getScores()); - view.getScorePanel().setAccumulatedScore(gameState.getAccumulatedScore()); + view.getScorePanel().setAccumulatedScore( + gameState.getAccumulatedScore()); view.getScorePanel().update(); view.showScorePanel(true); } |