From f3f8ffe4621e91d33732bba9e103ff790a16c7b3 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 20 Jun 2011 03:59:04 +0200 Subject: Added NetworkGameControl git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@503 72836036-5685-4462-b002-a69064685172 --- mock/jrummikub/control/network/MockConnectionControl.java | 13 +++++++++++++ mock/jrummikub/model/MockRoundState.java | 13 ++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'mock') diff --git a/mock/jrummikub/control/network/MockConnectionControl.java b/mock/jrummikub/control/network/MockConnectionControl.java index d0bb1fa..32c22c4 100644 --- a/mock/jrummikub/control/network/MockConnectionControl.java +++ b/mock/jrummikub/control/network/MockConnectionControl.java @@ -37,6 +37,8 @@ public class MockConnectionControl implements IConnectionControl { /** */ public MockEvent gameStartEvent = new MockEvent(); /** */ + public MockEvent roundStartEvent = new MockEvent(); + /** */ public MockEvent1 tableUpdateEvent = new MockEvent1(); /** */ public MockEvent1 turnEndEvent = new MockEvent1(); @@ -124,6 +126,11 @@ public class MockConnectionControl implements IConnectionControl { return gameStartEvent; } + @Override + public IEvent getRoundStartEvent() { + return roundStartEvent; + } + @Override public IEvent1 getTableUpdateEvent() { return tableUpdateEvent; @@ -203,4 +210,10 @@ public class MockConnectionControl implements IConnectionControl { public void startTurn(IRoundState state) { turnStarted = true; } + + @Override + public void startRound() { + // TODO Auto-generated method stub + + } } diff --git a/mock/jrummikub/model/MockRoundState.java b/mock/jrummikub/model/MockRoundState.java index c387396..9b36906 100644 --- a/mock/jrummikub/model/MockRoundState.java +++ b/mock/jrummikub/model/MockRoundState.java @@ -26,14 +26,16 @@ public class MockRoundState implements IRoundState { /** */ public int turnNumber; /** */ - + public GameState gameState; + + /** */ public MockRoundState() { table = new MockTable(); players = new ArrayList(); players.add(new MockPlayer(new PlayerSettings("Player 1", Color.RED), gameSettings)); - players.add(new MockPlayer( - new PlayerSettings("Player 2", Color.YELLOW), gameSettings)); + players.add(new MockPlayer(new PlayerSettings("Player 2", Color.YELLOW), + gameSettings)); players.add(new MockPlayer(new PlayerSettings("Player 3", Color.GREEN), gameSettings)); players.add(new MockPlayer(new PlayerSettings("Player 4", Color.BLACK), @@ -126,4 +128,9 @@ public class MockRoundState implements IRoundState { public void nextTurn() { turnNumber++; } + + @Override + public GameState getGameState() { + return gameState; + } } -- cgit v1.2.3