summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-05-18 16:02:23 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-05-18 16:02:23 +0200
commit5169f31af06926f4c268062791f648f1fdd91656 (patch)
tree4f490bfbcb72a8c1432a5b68cf3726f6373d1e72 /src/jrummikub/control
parent0b252810c9eb0f822c50d144b2ef0c652202d871 (diff)
downloadJRummikub-5169f31af06926f4c268062791f648f1fdd91656.tar
JRummikub-5169f31af06926f4c268062791f648f1fdd91656.zip
Add GameSettings with the initial meld threshold
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@251 72836036-5685-4462-b002-a69064685172
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() {