summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIda Massow <massow@informatik.uni-luebeck.de>2011-05-21 16:10:40 +0200
committerIda Massow <massow@informatik.uni-luebeck.de>2011-05-21 16:10:40 +0200
commit9290db240a10d107801a568e57d742a36052ccc0 (patch)
treec7147d2f91c6a31b6893619e14e1784c2946beda
parent941c81497a5809003db7465a3707a10492aca64f (diff)
downloadJRummikub-9290db240a10d107801a568e57d742a36052ccc0.tar
JRummikub-9290db240a10d107801a568e57d742a36052ccc0.zip
Nochmal, git ist schwierig
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@258 72836036-5685-4462-b002-a69064685172
-rw-r--r--mock/jrummikub/model/MockGameSettings.java34
-rw-r--r--src/jrummikub/model/IGameSettings.java29
2 files changed, 63 insertions, 0 deletions
diff --git a/mock/jrummikub/model/MockGameSettings.java b/mock/jrummikub/model/MockGameSettings.java
new file mode 100644
index 0000000..83b5fdc
--- /dev/null
+++ b/mock/jrummikub/model/MockGameSettings.java
@@ -0,0 +1,34 @@
+package jrummikub.model;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.awt.Color;
+
+public class MockGameSettings implements IGameSettings {
+ List<PlayerSettings> players = new ArrayList<PlayerSettings>();
+ int initialMeldThreshold;
+
+ public MockGameSettings() {
+ players.add(new PlayerSettings("Bennet", Color.BLUE));
+ players.add(new PlayerSettings("Matze", Color.BLACK));
+ players.add(new PlayerSettings("Ida", Color.RED));
+ players.add(new PlayerSettings("Jannis", Color.PINK));
+ initialMeldThreshold=30;
+ }
+
+ @Override
+ public List<PlayerSettings> getPlayerList() {
+ return players;
+ }
+
+ @Override
+ public void setInitialMeldThreshold(int value) {
+ initialMeldThreshold = value;
+ }
+
+ @Override
+ public int getInitialMeldThreshold() {
+ return initialMeldThreshold;
+ }
+
+}
diff --git a/src/jrummikub/model/IGameSettings.java b/src/jrummikub/model/IGameSettings.java
new file mode 100644
index 0000000..68e801a
--- /dev/null
+++ b/src/jrummikub/model/IGameSettings.java
@@ -0,0 +1,29 @@
+package jrummikub.model;
+
+import java.util.List;
+
+public interface IGameSettings {
+
+ /**
+ * Returns the list containing the settings of all players
+ *
+ * @return the player settings list
+ */
+ public List<PlayerSettings> getPlayerList();
+
+ /**
+ * Sets the initial meld threshold
+ *
+ * @param value
+ * the value to set
+ */
+ public void setInitialMeldThreshold(int value);
+
+ /**
+ * Returns the initial meld threshold
+ *
+ * @return the threshold
+ */
+ public int getInitialMeldThreshold();
+
+} \ No newline at end of file