|
||||||||||
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 that stores information for a game of multiple rounds
Field Summary | |
---|---|
private int |
firstRoundFirstPlayer
|
private PlayerSettings |
lastPlayerRedealed
|
private java.util.ArrayList<Score> |
scores
|
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
GameState()
|
Method Summary | |
---|---|
Score |
getAccumulatedScore()
Calculated the accumulated score over the played rounds |
int |
getFirstRoundFirstPlayer()
Gets the number of the first player of the first round |
PlayerSettings |
getLastPlayerRedealed()
Returns the player that has redealed last |
java.util.List<Score> |
getScores()
Returns the list of players' scores in the rounds played before |
private java.lang.Boolean[] |
getWinners(java.lang.Integer[] points,
int[] wins)
Returns whether players have won |
void |
setFirstRoundFirstPlayer(int firstRoundFirstPlayer)
Sets the number of the first player of the first round |
void |
setLastPlayerRedealed(PlayerSettings lastPlayerRedealed)
Sets the player that has redealed last |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private int firstRoundFirstPlayer
private java.util.ArrayList<Score> scores
private PlayerSettings lastPlayerRedealed
Constructor Detail |
---|
public GameState()
Method Detail |
---|
public int getFirstRoundFirstPlayer()
public void setFirstRoundFirstPlayer(int firstRoundFirstPlayer)
firstRoundFirstPlayer
- the number of the first player of the first roundpublic void setLastPlayerRedealed(PlayerSettings lastPlayerRedealed)
lastPlayerRedealed
- the player to setpublic PlayerSettings getLastPlayerRedealed()
public java.util.List<Score> getScores()
private java.lang.Boolean[] getWinners(java.lang.Integer[] points, int[] wins)
points
- the player's pointswins
- the number of wins per player
public Score getAccumulatedScore()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |