|
||||||||||
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()
Turn
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.
getGame
in interface Turn
public Player getPlayer()
Turn
Returns the player involved in this turn.
getPlayer
in interface Turn
public Player getActualPlayer()
Turn
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.
getActualPlayer
in interface Turn
public void addThrow(Throw t)
Turn
Add a throw to this turn.
addThrow
in interface Turn
public Throw getThrow(int index)
Turn
Get specified throw of this turn.
getThrow
in interface Turn
public java.util.Vector getThrows()
Turn
Get this turn's throws. The resulting list contains Throw objects.
getThrows
in interface Turn
public void setValid(boolean b)
Turn
Set whether or not this was a valid turn. This is decided by the game.
setValid
in interface Turn
public boolean isValid()
Turn
Return whether or not this was a valid turn.
isValid
in interface Turn
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |