diff options
Diffstat (limited to 'test/jrummikub/view')
-rw-r--r-- | test/jrummikub/view/MockView.java | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/test/jrummikub/view/MockView.java b/test/jrummikub/view/MockView.java index 3165478..e208375 100644 --- a/test/jrummikub/view/MockView.java +++ b/test/jrummikub/view/MockView.java @@ -4,6 +4,7 @@ import java.util.Collection; import jrummikub.model.Stone; import jrummikub.util.IEvent; +import jrummikub.util.MockEvent; public class MockView implements IView { public MockPlayerPanel playerPanel = new MockPlayerPanel(); @@ -11,21 +12,28 @@ public class MockView implements IView { public Collection<Stone> selectedStones; + public String currentPlayerName; + public boolean displayStartTurnPanel = false; + public boolean displayWinPanel = false; + + public MockEvent startTurnEvent = new MockEvent(); + public MockEvent quitEvent = new MockEvent(); + public MockEvent newGameEvent = new MockEvent(); + @Override - public ITablePanel getTablePanel() { + public MockTablePanel getTablePanel() { // TODO Auto-generated method stub return null; } @Override - public IPlayerPanel getPlayerPanel() { + public MockPlayerPanel getPlayerPanel() { return playerPanel; } @Override public void setCurrentPlayerName(String playerName) { - // TODO Auto-generated method stub - + currentPlayerName = playerName; } @Override @@ -35,32 +43,27 @@ public class MockView implements IView { @Override public void enableStartTurnPanel(boolean enable) { - // TODO Auto-generated method stub - + displayStartTurnPanel = enable; } @Override public IEvent getStartTurnEvent() { - // TODO Auto-generated method stub - return null; + return startTurnEvent; } @Override public void enableWinPanel(boolean enable) { - // TODO Auto-generated method stub - + displayWinPanel = enable; } @Override public IEvent getQuitEvent() { - // TODO Auto-generated method stub - return null; + return quitEvent; } @Override public IEvent getNewGameEvent() { - // TODO Auto-generated method stub - return null; + return newGameEvent; } }
\ No newline at end of file |