summaryrefslogtreecommitdiffstats
path: root/mock/jrummikub
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-05-31 01:50:56 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-05-31 01:50:56 +0200
commitc004a07a4267f3320d23f3d1d2cf483cd56f40b7 (patch)
tree97ea6ce039c22c9cece01bf59a686edb0ba14d1a /mock/jrummikub
parentc78e8e64484b887cbdd2f5e903ce25828c93e08a (diff)
downloadJRummikub-c004a07a4267f3320d23f3d1d2cf483cd56f40b7.tar
JRummikub-c004a07a4267f3320d23f3d1d2cf483cd56f40b7.zip
Make highest value and number of stones dealt settable
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@337 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'mock/jrummikub')
-rw-r--r--mock/jrummikub/view/MockSettingsPanel.java35
1 files changed, 34 insertions, 1 deletions
diff --git a/mock/jrummikub/view/MockSettingsPanel.java b/mock/jrummikub/view/MockSettingsPanel.java
index f296286..5f69680 100644
--- a/mock/jrummikub/view/MockSettingsPanel.java
+++ b/mock/jrummikub/view/MockSettingsPanel.java
@@ -1,10 +1,13 @@
package jrummikub.view;
import java.awt.Color;
+import java.util.HashSet;
+import java.util.Set;
import jrummikub.control.turn.TurnControlFactory;
import jrummikub.control.turn.TurnControlFactory.Type;
import jrummikub.model.GameSettings;
+import jrummikub.model.StoneColor;
import jrummikub.util.IEvent;
import jrummikub.util.IEvent1;
import jrummikub.util.IEvent2;
@@ -42,12 +45,24 @@ public class MockSettingsPanel implements ISettingsPanel {
public MockEvent1<Integer> changeJokerNumberEvent = new MockEvent1<Integer>();
/** */
public MockEvent1<Integer> changeStoneSetNumberEvent = new MockEvent1<Integer>();
+ /** */
+ public MockEvent1<Integer> changeNumberOfStonesDealtEvent = new MockEvent1<Integer>();
+ /** */
+ public MockEvent1<Integer> changeHighestValueEvent = new MockEvent1<Integer>();
+ /** */
+ public MockEvent1<Set<StoneColor>> changeStoneColorsEvent = new MockEvent1<Set<StoneColor>>();
/** */
public int initialMeldThreshold;
/** */
public int jokerNumber;
-
+ /** */
public int stoneSetNumber;
+ /** */
+ public int numberOfStonesDealt;
+ /** */
+ public int highestValue;
+ /** */
+ public Set<StoneColor> stoneColors;
@Override
public IEvent getAddPlayerEvent() {
@@ -75,6 +90,21 @@ public class MockSettingsPanel implements ISettingsPanel {
}
@Override
+ public IEvent1<Integer> getChangeNumberOfStonesDealtEvent() {
+ return changeNumberOfStonesDealtEvent;
+ }
+
+ @Override
+ public IEvent1<Integer> getChangeHighestValueEvent() {
+ return changeHighestValueEvent;
+ }
+
+ @Override
+ public IEvent1<Set<StoneColor>> getChangeStoneColorsEvent() {
+ return changeStoneColorsEvent;
+ }
+
+ @Override
public IEvent getStartGameEvent() {
return startGameEvent;
}
@@ -108,6 +138,9 @@ public class MockSettingsPanel implements ISettingsPanel {
initialMeldThreshold = gameSettings.getInitialMeldThreshold();
jokerNumber = gameSettings.getJokerNumber();
stoneSetNumber = gameSettings.getStoneSetNumber();
+ numberOfStonesDealt = gameSettings.getNumberOfStonesDealt();
+ highestValue = gameSettings.getHighestValue();
+ stoneColors = new HashSet<StoneColor>(gameSettings.getStoneColors());
}
@Override