summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/model')
-rw-r--r--src/jrummikub/model/GameSettings.java24
-rw-r--r--src/jrummikub/model/IGameSettings.java29
-rw-r--r--src/jrummikub/model/IRoundState.java2
-rw-r--r--src/jrummikub/model/RoundState.java6
4 files changed, 18 insertions, 43 deletions
diff --git a/src/jrummikub/model/GameSettings.java b/src/jrummikub/model/GameSettings.java
index 8ace0fb..b5079d4 100644
--- a/src/jrummikub/model/GameSettings.java
+++ b/src/jrummikub/model/GameSettings.java
@@ -6,7 +6,7 @@ import java.util.List;
/**
* The overall game settings
*/
-public class GameSettings implements IGameSettings {
+public class GameSettings {
private List<PlayerSettings> players = new ArrayList<PlayerSettings>();
private int initialMeldThreshold;
@@ -18,26 +18,30 @@ public class GameSettings implements IGameSettings {
initialMeldThreshold = 30;
}
- /* (non-Javadoc)
- * @see jrummikub.model.IGameSettings#getPlayerList()
+ /**
+ * Returns the list containing the settings of all players
+ *
+ * @return the player settings list
*/
- @Override
public List<PlayerSettings> getPlayerList() {
return players;
}
- /* (non-Javadoc)
- * @see jrummikub.model.IGameSettings#setInitialMeldThreshold(int)
+ /**
+ * Sets the initial meld threshold
+ *
+ * @param value
+ * the value to set
*/
- @Override
public void setInitialMeldThreshold(int value) {
initialMeldThreshold = value;
}
- /* (non-Javadoc)
- * @see jrummikub.model.IGameSettings#getInitialMeldThreshold()
+ /**
+ * Returns the initial meld threshold
+ *
+ * @return the threshold
*/
- @Override
public int getInitialMeldThreshold() {
return initialMeldThreshold;
}
diff --git a/src/jrummikub/model/IGameSettings.java b/src/jrummikub/model/IGameSettings.java
deleted file mode 100644
index 68e801a..0000000
--- a/src/jrummikub/model/IGameSettings.java
+++ /dev/null
@@ -1,29 +0,0 @@
-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
diff --git a/src/jrummikub/model/IRoundState.java b/src/jrummikub/model/IRoundState.java
index aba27af..af7a478 100644
--- a/src/jrummikub/model/IRoundState.java
+++ b/src/jrummikub/model/IRoundState.java
@@ -10,7 +10,7 @@ public interface IRoundState {
*
* @return The game settings
*/
- public IGameSettings getGameSettings();
+ public GameSettings getGameSettings();
/**
* Get the current {@link Table}
diff --git a/src/jrummikub/model/RoundState.java b/src/jrummikub/model/RoundState.java
index 63b72ea..56f7904 100644
--- a/src/jrummikub/model/RoundState.java
+++ b/src/jrummikub/model/RoundState.java
@@ -5,7 +5,7 @@ import java.util.List;
/** Class managing the overall and momentary RoundState */
public class RoundState implements IRoundState {
- private IGameSettings gameSettings;
+ private GameSettings gameSettings;
private ITable table;
private List<Player> players;
@@ -18,7 +18,7 @@ public class RoundState implements IRoundState {
* @param gameSettings
* the game settings
*/
- public RoundState(IGameSettings gameSettings) {
+ public RoundState(GameSettings gameSettings) {
this.gameSettings = gameSettings;
table = new Table();
@@ -68,7 +68,7 @@ public class RoundState implements IRoundState {
}
@Override
- public IGameSettings getGameSettings() {
+ public GameSettings getGameSettings() {
return gameSettings;
}
}