From b1fd03e366971ee53d6260b36b8236a996104fd4 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 5 May 2011 17:14:34 +0200 Subject: Show player name labels git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@146 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/model/GameState.java | 5 +++++ src/jrummikub/model/IGameState.java | 2 ++ 2 files changed, 7 insertions(+) (limited to 'src/jrummikub/model') diff --git a/src/jrummikub/model/GameState.java b/src/jrummikub/model/GameState.java index 3bd4d94..0539ea0 100644 --- a/src/jrummikub/model/GameState.java +++ b/src/jrummikub/model/GameState.java @@ -43,6 +43,11 @@ public class GameState implements IGameState { activePlayer = (activePlayer + 1) % players.size(); } + @Override + public IPlayer getNthNextPlayer(int i) { + return players.get((activePlayer + i) % players.size()); + } + @Override public IPlayer getActivePlayer() { return players.get(activePlayer); diff --git a/src/jrummikub/model/IGameState.java b/src/jrummikub/model/IGameState.java index 56ab917..46ea0b0 100644 --- a/src/jrummikub/model/IGameState.java +++ b/src/jrummikub/model/IGameState.java @@ -15,4 +15,6 @@ public interface IGameState { public StoneHeap getGameHeap(); + public IPlayer getNthNextPlayer(int i); + } \ No newline at end of file -- cgit v1.2.3