org.dartra.standard
Class StandardBoard

java.lang.Object
  extended byorg.dartra.standard.PersistentObject
      extended byorg.dartra.standard.StandardBoard
All Implemented Interfaces:
Board, Persistent

public class StandardBoard
extends PersistentObject
implements Board

A standard darts board with 20 numbers, a doubles circle, a triples circle and a single and double bull.

Author:
Erwin Vervaet, Maarten De Cock

Constructor Summary
StandardBoard()
           
 
Method Summary
 java.lang.String getName()
          Return the name of the board.
 double getSize()
          Returns the size of the board (diameter).
 Zone getZone(int number, int multiplier, boolean inner)
          Get the zone with given numer and multiplier.
 Zone getZone(Location loc)
          Get the zone containing given location on the board, or null if there is no such zone.
 Zone getZone(java.lang.String code)
          Get the zone with given code, or null if there is no such zone.
 java.util.Vector getZones()
          Get the collection of zones for this board.
 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

StandardBoard

public StandardBoard()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Board

Return the name of the board.

Specified by:
getName in interface Board

getZone

public Zone getZone(java.lang.String code)
Description copied from interface: Board

Get the zone with given code, or null if there is no such zone.

Specified by:
getZone in interface Board

getZone

public Zone getZone(Location loc)
Description copied from interface: Board

Get the zone containing given location on the board, or null if there is no such zone.

Specified by:
getZone in interface Board

getSize

public double getSize()
Description copied from interface: Board

Returns the size of the board (diameter).

Specified by:
getSize in interface Board

getZone

public Zone getZone(int number,
                    int multiplier,
                    boolean inner)

Get the zone with given numer and multiplier. For singles, when inner is true, the inner single is returned, otherwise the outer single.


getZones

public java.util.Vector getZones()
Description copied from interface: Board

Get the collection of zones for this board. The returned collection contains Zone objects.

Specified by:
getZones in interface Board

toString

public java.lang.String toString()