org.dartra.standard
Class StandardThrow

java.lang.Object
  extended byorg.dartra.standard.PersistentObject
      extended byorg.dartra.standard.StandardThrow
All Implemented Interfaces:
Persistent, Throw

public class StandardThrow
extends PersistentObject
implements Throw

A standard throw implementation.

Author:
Erwin Vervaet

Constructor Summary
StandardThrow(Turn turn, Zone targetZone, Hit hit)
           
 
Method Summary
 Hit getHit()
          Returns the hit information for the zone: where did the dart that was thrown hit the darts board?
 Zone getTargetZone()
          Returns the zone this throw was targetted at.
 Turn getTurn()
          Returns the turn this throw belows to.
 boolean isValid()
          Return whether or not this is a valid throw.
 void setValid(boolean b)
          Set whether or not this is a valid throw.
 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

StandardThrow

public StandardThrow(Turn turn,
                     Zone targetZone,
                     Hit hit)
Method Detail

getTurn

public Turn getTurn()
Description copied from interface: Throw

Returns the turn this throw belows to.

Specified by:
getTurn in interface Throw

getTargetZone

public Zone getTargetZone()
Description copied from interface: Throw

Returns the zone this throw was targetted at.

Specified by:
getTargetZone in interface Throw

getHit

public Hit getHit()
Description copied from interface: Throw

Returns the hit information for the zone: where did the dart that was thrown hit the darts board?

Specified by:
getHit in interface Throw

setValid

public void setValid(boolean b)
Description copied from interface: Throw

Set whether or not this is a valid throw. This is decided by the game.

Specified by:
setValid in interface Throw

isValid

public boolean isValid()
Description copied from interface: Throw

Return whether or not this is a valid throw.

Specified by:
isValid in interface Throw

toString

public java.lang.String toString()