summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/model
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-06-20 03:59:04 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-06-20 03:59:04 +0200
commitf3f8ffe4621e91d33732bba9e103ff790a16c7b3 (patch)
treea4663053ea570c7a077a244de9f4f884294208d1 /src/jrummikub/model
parente79295f271062f2186c2ce0f9b69f1ddfc964abf (diff)
downloadJRummikub-f3f8ffe4621e91d33732bba9e103ff790a16c7b3.tar
JRummikub-f3f8ffe4621e91d33732bba9e103ff790a16c7b3.zip
Added NetworkGameControl
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@503 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/model')
-rw-r--r--src/jrummikub/model/IRoundState.java4
-rw-r--r--src/jrummikub/model/RoundState.java9
2 files changed, 11 insertions, 2 deletions
diff --git a/src/jrummikub/model/IRoundState.java b/src/jrummikub/model/IRoundState.java
index d394694..1ac0ac2 100644
--- a/src/jrummikub/model/IRoundState.java
+++ b/src/jrummikub/model/IRoundState.java
@@ -96,13 +96,15 @@ public interface IRoundState extends Serializable {
*/
public void setActivePlayerNumber(int i);
+ public GameState getGameState();
+
/**
* Gets the number of the current turn. Numbers smaller than one indicate hand
* inspection turns
*
* @return current turn number
*/
- public abstract int getTurnNumber();
+ public int getTurnNumber();
/**
* Increments the turn number
diff --git a/src/jrummikub/model/RoundState.java b/src/jrummikub/model/RoundState.java
index e2125a7..2c50089 100644
--- a/src/jrummikub/model/RoundState.java
+++ b/src/jrummikub/model/RoundState.java
@@ -7,6 +7,7 @@ public class RoundState implements IRoundState {
private static final long serialVersionUID = 8678490099871939059L;
private GameSettings gameSettings;
+ private GameState gameState;
private ITable table;
private ArrayList<Player> players;
@@ -21,8 +22,9 @@ public class RoundState implements IRoundState {
* @param gameSettings
* the game settings
*/
- public RoundState(GameSettings gameSettings) {
+ public RoundState(GameSettings gameSettings, GameState gameState) {
this.gameSettings = gameSettings;
+ this.gameState = gameState;
table = new Table(gameSettings);
players = new ArrayList<Player>();
@@ -118,4 +120,9 @@ public class RoundState implements IRoundState {
public void nextTurn() {
turnNumber++;
}
+
+ @Override
+ public GameState getGameState() {
+ return gameState;
+ }
}