From 5169f31af06926f4c268062791f648f1fdd91656 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 18 May 2011 16:02:23 +0200 Subject: Add GameSettings with the initial meld threshold git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@251 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/GameControl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/jrummikub/control') 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() { -- cgit v1.2.3