dd.util
Interface FishbanksConstants

All Known Implementing Classes:
FishbanksSupport

public interface FishbanksConstants

Contains useful constants for the Fishbanks game. FishbanksConstants is a helper interface that contains a bunch of static constants, mostly keys that refer to attribute names. The reason for this interface is so that a class can implement the interface and automatically get at the constants. (This is something of an abuse of interfaces, but it works and simplifies the code).

These constants should be used rather than strings for attribute and layer names so that the names can change without requiring major changes throughout the code. It avoids the hard-coding of attribute names.

Author:
Eric Scharff

Field Summary
static java.lang.String BOAT
          Attribute key for a cell or layer's boat.
static java.lang.String COASTAL_WATERS
          Name of the coastal waters layer.
static java.lang.String DEEP_OCEAN
          Name of the deep ocean layer.
static java.lang.String HARBOR
          Name of the harbor layer.
static java.lang.String LAND
          The attribute value for land type if the current cell represents land or water.
static java.lang.String TYPE
          Attribute key for a cell's type.
 

Field Detail

LAND

public static final java.lang.String LAND
The attribute value for land type if the current cell represents land or water. This is only used to determine what a cell may contain.

See Also:
Constant Field Values

TYPE

public static final java.lang.String TYPE
Attribute key for a cell's type. This key can be used to determine what a cell contains (such as LAND).

See Also:
Constant Field Values

BOAT

public static final java.lang.String BOAT
Attribute key for a cell or layer's boat. This key is used to figure out if there is a boat in a cell. The value retruned by this key is an integer (the team number) who owns the boat, or -1 if there is no boat in this cell.

See Also:
Constant Field Values

DEEP_OCEAN

public static final java.lang.String DEEP_OCEAN
Name of the deep ocean layer.

See Also:
Constant Field Values

COASTAL_WATERS

public static final java.lang.String COASTAL_WATERS
Name of the coastal waters layer.

See Also:
Constant Field Values

HARBOR

public static final java.lang.String HARBOR
Name of the harbor layer.

See Also:
Constant Field Values