org.dartra.framework
Interface Board

All Superinterfaces:
Persistent
All Known Implementing Classes:
StandardBoard

public interface Board
extends Persistent

A darts board. A darts game is played on a darts board. A darts board consists of several zones. In a way, a Board object is a factory of Zone objects.

Darts boards are really strategy objects so they have reference semantics. A darts board is an algorithm to calculate a zone based on hit information.

Author:
Erwin Vervaet

Method Summary
 java.lang.String getName()
          Return the name of the board.
 double getSize()
          Returns the size of the board (diameter).
 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.
 
Methods inherited from interface org.dartra.framework.Persistent
getId, setId
 

Method Detail

getName

public java.lang.String getName()

Return the name of the board.


getZones

public java.util.Vector getZones()

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


getZone

public Zone getZone(java.lang.String code)

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


getZone

public Zone getZone(Location loc)

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


getSize

public double getSize()

Returns the size of the board (diameter).