Add GameSettings with the initial meld threshold

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@251 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Matthias Schiffer 2011-05-18 16:02:23 +02:00
parent 0b252810c9
commit 5169f31af0
7 changed files with 77 additions and 10 deletions

View file

@ -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() {