summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/control')
-rw-r--r--src/jrummikub/control/GameControl.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/jrummikub/control/GameControl.java b/src/jrummikub/control/GameControl.java
index 14e5adc..195eba3 100644
--- a/src/jrummikub/control/GameControl.java
+++ b/src/jrummikub/control/GameControl.java
@@ -1,5 +1,6 @@
package jrummikub.control;
+import jrummikub.model.GameSettings;
import jrummikub.model.RoundState;
import jrummikub.util.IListener;
import jrummikub.view.IView;
@@ -8,16 +9,20 @@ import jrummikub.view.IView;
* Controls a Game, at some point including all Rounds, starts new Rounds
*/
public class GameControl {
+ private GameSettings gameSettings;
private IView view;
private RoundControl roundControl;
/**
* Constructor
*
+ * @param gameSettings
+ * the game settings
* @param view
* the view
*/
- public GameControl(IView view) {
+ public GameControl(GameSettings gameSettings, IView view) {
+ this.gameSettings = gameSettings;
this.view = view;
view.getNewGameEvent().add(new IListener() {
@@ -46,7 +51,7 @@ public class GameControl {
return;
}
- RoundState gameState = new RoundState();
+ RoundState gameState = new RoundState(gameSettings);
roundControl = new RoundControl(gameState, view);
roundControl.getEndRoundEvent().add(new IListener() {