|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The turn of a player in a game. A turn consists of several throws.
Turn objects have reference semantics. Each turn is unique.
Method Summary | |
void |
addThrow(Throw t)
Add a throw to this turn. |
Player |
getActualPlayer()
Returns the player that actually executed the turn. |
Game |
getGame()
Returns the game that this turn is part of. |
Player |
getPlayer()
Returns the player involved in this turn. |
Throw |
getThrow(int index)
Get specified throw of this turn. |
java.util.Vector |
getThrows()
Get this turn's throws. |
boolean |
isValid()
Return whether or not this was a valid turn. |
void |
setValid(boolean b)
Set whether or not this was a valid turn. |
Methods inherited from interface org.dartra.framework.Persistent |
getId, setId |
Method Detail |
public Game getGame()
Returns the game that this turn is part of. For a simple game, this will return the same game as the game the player is active in. However, for matches, the player is active in the match, but this method returns the actual game in the match the turn is part of.
public Player getPlayer()
Returns the player involved in this turn.
public Player getActualPlayer()
Returns the player that actually executed the turn. For simple players, this will be the same player as returned by the getPlayer() method. For teams however, the getPlayer() method will return the team that was active during the turn, and this method will return the player on that team that actually executed the turn.
public void addThrow(Throw t)
Add a throw to this turn.
public Throw getThrow(int index)
Get specified throw of this turn.
public java.util.Vector getThrows()
Get this turn's throws. The resulting list contains Throw objects.
public void setValid(boolean b)
Set whether or not this was a valid turn. This is decided by the game.
public boolean isValid()
Return whether or not this was a valid turn.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |