|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jrummikub.model.Player
public class Player
Class managing player data. No methods in release 1
Field Summary | |
---|---|
private IHand |
hand
|
private boolean |
laidOut
|
private boolean |
lastTurnInvalid
|
private int |
lastTurnStoneCount
|
private static long |
serialVersionUID
|
private PlayerSettings |
settings
|
Constructor Summary | |
---|---|
Player(PlayerSettings settings)
Create a new player with a given name and color |
Method Summary | |
---|---|
IHand |
getHand()
Get the current hand of the player |
boolean |
getLaidOut()
Has the player laid out yet? |
int |
getLastTurnStoneCount()
Gets the number of stones put on table in player's last turn |
PlayerSettings |
getPlayerSettings()
Returns the player settings |
void |
setHand(IHand hand)
Set the current hand of the player |
void |
setLaidOut(boolean laidOut)
Set if the player laid out |
void |
setLastTurnInvalid(boolean value)
Sets last turn invalid |
void |
setLastTurnStoneCount(int value)
Sets the number of stones out on the table in player's last turn |
boolean |
wasLastTurnInvalid()
Getter for last turn invalid |
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 PlayerSettings settings
private IHand hand
private boolean laidOut
private boolean lastTurnInvalid
private int lastTurnStoneCount
Constructor Detail |
---|
public Player(PlayerSettings settings)
settings
- the player settingsMethod Detail |
---|
public IHand getHand()
IPlayer
getHand
in interface IPlayer
public void setHand(IHand hand)
IPlayer
setHand
in interface IPlayer
hand
- the new handpublic boolean getLaidOut()
IPlayer
getLaidOut
in interface IPlayer
public void setLaidOut(boolean laidOut)
IPlayer
setLaidOut
in interface IPlayer
laidOut
- the player laid outpublic PlayerSettings getPlayerSettings()
IPlayer
getPlayerSettings
in interface IPlayer
public boolean wasLastTurnInvalid()
IPlayer
wasLastTurnInvalid
in interface IPlayer
public void setLastTurnInvalid(boolean value)
IPlayer
setLastTurnInvalid
in interface IPlayer
value
- last turn invalidpublic int getLastTurnStoneCount()
IPlayer
getLastTurnStoneCount
in interface IPlayer
public void setLastTurnStoneCount(int value)
IPlayer
setLastTurnStoneCount
in interface IPlayer
value
- number of stones
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |