|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jrummikub.model.GameState
public class GameState
Class managing the overall and momentary GameState
Constructor Summary | |
---|---|
GameState()
Create a new GameState with an empty table and (currently) 4 new players. |
Method Summary | |
---|---|
IPlayer |
getActivePlayer()
Returns the currently active player |
StoneHeap |
getGameHeap()
Returns the heap of stones to draw from |
IPlayer |
getNthNextPlayer(int i)
Returns the player that would be the active player after i turns |
int |
getPlayerCount()
Returns the number of players |
ITable |
getTable()
Get the current Table |
void |
nextPlayer()
Changes the activePlayer to the next Player in the list |
void |
setTable(ITable table)
Sets the current Table |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GameState()
Method Detail |
---|
public ITable getTable()
IGameState
Table
getTable
in interface IGameState
public void setTable(ITable table)
IGameState
Table
setTable
in interface IGameState
table
- The new Tablepublic int getPlayerCount()
IGameState
getPlayerCount
in interface IGameState
public void nextPlayer()
IGameState
Player
in the list
nextPlayer
in interface IGameState
public IPlayer getNthNextPlayer(int i)
IGameState
getNthNextPlayer
in interface IGameState
i
- number of turns
public IPlayer getActivePlayer()
IGameState
getActivePlayer
in interface IGameState
public StoneHeap getGameHeap()
IGameState
getGameHeap
in interface IGameState
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |