From b3c903a2ad86aa803fe9bcf83aea947c452241b5 Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Wed, 18 May 2011 15:25:26 +0200 Subject: GameState ist jetzt RoundState git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@249 72836036-5685-4462-b002-a69064685172 --- mock/jrummikub/model/MockGameState.java | 69 -------------------------------- mock/jrummikub/model/MockRoundState.java | 69 ++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 69 deletions(-) delete mode 100644 mock/jrummikub/model/MockGameState.java create mode 100644 mock/jrummikub/model/MockRoundState.java (limited to 'mock/jrummikub/model') diff --git a/mock/jrummikub/model/MockGameState.java b/mock/jrummikub/model/MockGameState.java deleted file mode 100644 index 53e332e..0000000 --- a/mock/jrummikub/model/MockGameState.java +++ /dev/null @@ -1,69 +0,0 @@ -package jrummikub.model; - -import java.awt.Color; -import java.util.ArrayList; -import java.util.List; - -/** - * Mock class for {@link GameState} - */ -public class MockGameState implements IGameState { - /** */ - public MockTable table; - /** */ - public ITable setTable; - /** */ - public List players; - /** */ - public int activePlayer; - /** */ - public StoneHeap gameHeap; - - /** */ - public MockGameState() { - table = new MockTable(); - players = new ArrayList(); - players.add(new MockPlayer("Player 1", Color.RED)); - players.add(new MockPlayer("Player 2", Color.YELLOW)); - players.add(new MockPlayer("Player 3", Color.GREEN)); - players.add(new MockPlayer("Player 4", Color.BLACK)); - activePlayer = 0; - gameHeap = new StoneHeap(); - } - - @Override - public ITable getTable() { - return table; - } - - @Override - public int getPlayerCount() { - return players.size(); - } - - /** Changes the activePlayer to the next {@link Player} in the list */ - @Override - public void nextPlayer() { - activePlayer = (activePlayer + 1) % players.size(); - } - - @Override - public IPlayer getActivePlayer() { - return players.get(activePlayer); - } - - @Override - public StoneHeap getGameHeap() { - return gameHeap; - } - - @Override - public IPlayer getNthNextPlayer(int i) { - return players.get((activePlayer + i) % players.size()); - } - - @Override - public void setTable(ITable table) { - setTable = table; - } -} diff --git a/mock/jrummikub/model/MockRoundState.java b/mock/jrummikub/model/MockRoundState.java new file mode 100644 index 0000000..9346783 --- /dev/null +++ b/mock/jrummikub/model/MockRoundState.java @@ -0,0 +1,69 @@ +package jrummikub.model; + +import java.awt.Color; +import java.util.ArrayList; +import java.util.List; + +/** + * Mock class for {@link RoundState} + */ +public class MockRoundState implements IRoundState { + /** */ + public MockTable table; + /** */ + public ITable setTable; + /** */ + public List players; + /** */ + public int activePlayer; + /** */ + public StoneHeap gameHeap; + + /** */ + public MockRoundState() { + table = new MockTable(); + players = new ArrayList(); + players.add(new MockPlayer("Player 1", Color.RED)); + players.add(new MockPlayer("Player 2", Color.YELLOW)); + players.add(new MockPlayer("Player 3", Color.GREEN)); + players.add(new MockPlayer("Player 4", Color.BLACK)); + activePlayer = 0; + gameHeap = new StoneHeap(); + } + + @Override + public ITable getTable() { + return table; + } + + @Override + public int getPlayerCount() { + return players.size(); + } + + /** Changes the activePlayer to the next {@link Player} in the list */ + @Override + public void nextPlayer() { + activePlayer = (activePlayer + 1) % players.size(); + } + + @Override + public IPlayer getActivePlayer() { + return players.get(activePlayer); + } + + @Override + public StoneHeap getGameHeap() { + return gameHeap; + } + + @Override + public IPlayer getNthNextPlayer(int i) { + return players.get((activePlayer + i) % players.size()); + } + + @Override + public void setTable(ITable table) { + setTable = table; + } +} -- cgit v1.2.3