|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dartra.standard.PersistentObject
org.dartra.standard.StandardTurn
Standard implementation of the Turn interface.
| Constructor Summary | |
StandardTurn(Game game,
Player player)
|
|
| 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. |
java.lang.String |
toString()
|
| Methods inherited from class org.dartra.standard.PersistentObject |
getId, setId |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.dartra.framework.Persistent |
getId, setId |
| Constructor Detail |
public StandardTurn(Game game,
Player player)
| Method Detail |
public Game getGame()
TurnReturns 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.
getGame in interface Turnpublic Player getPlayer()
TurnReturns the player involved in this turn.
getPlayer in interface Turnpublic Player getActualPlayer()
TurnReturns 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.
getActualPlayer in interface Turnpublic void addThrow(Throw t)
TurnAdd a throw to this turn.
addThrow in interface Turnpublic Throw getThrow(int index)
TurnGet specified throw of this turn.
getThrow in interface Turnpublic java.util.Vector getThrows()
TurnGet this turn's throws. The resulting list contains Throw objects.
getThrows in interface Turnpublic void setValid(boolean b)
TurnSet whether or not this was a valid turn. This is decided by the game.
setValid in interface Turnpublic boolean isValid()
TurnReturn whether or not this was a valid turn.
isValid in interface Turnpublic java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||