Logo Search packages:      
Sourcecode: filler version File versions  Download package

friendless::games::filler::FillerModel Class Reference

List of all members.

Detailed Description

A class which represents what colour the hexagons are. This class has been extended to cater for the needs of robot players.

John Farrell

Definition at line 31 of file FillerModel.java.

Public Member Functions

 FillerModel (int[] pieces)
int[] getPieces ()
void setPieces (int[] pieces)

Static Public Member Functions

static final int getX (int i)
static final int getY (int i)
static final boolean isPerimeter (int i)
static final int makeIndex (int x, int y)
static final int[] neighbours (int i)
static final boolean valid (int i)

Static Public Attributes

static final int BORDER = 6
static final int FREE = 8
static final int HIS = 3
static final int HIS_BORDER = 1
static final int HIS_INTERNAL_BORDER = 10
static final int HIS_REACHABLE = 5
static final int INTERNAL_BORDER = 9
static final int MINE = 7
static final BitSet MUST_BE_FREE = new BitSet(NUM_TYPES)
static final BitSet MUST_BE_HIS = new BitSet(NUM_TYPES)
static final BitSet MUST_BE_MINE = new BitSet(NUM_TYPES)
static final int NO_DISTANCE = 0
static final int NO_NEIGHBOUR = -1
static final int NUM_TYPES = 11
static final int REACHABLE = 4
static final int SHARED_BORDER = 2
static final int UNKNOWN_DISTANCE = -2
static final int UNREACHABLE_DISTANCE = -1
static final int VACANT = 0

Static Protected Member Functions

static void allocate (FillerModel model, int origin, FillerPlayerSpace space, int mine, int myBorder)

Package Functions

void randomFill (boolean remoteGame)

Static Package Functions

 [static initializer]
static void allocateDistance (FillerModel model, FillerPlayerSpace space)
static void allocateFree (FillerModel model, FillerPlayerSpace space, int myBorder, boolean[] reachable)
static void allocateTypes (FillerModel model, int[] origins, FillerPlayerSpace space)

Package Attributes

int[] pieces

Static Private Member Functions

static final int[] calcNeighbours (int i, int[] ps)

Static Private Attributes

static int count = 0
static final int MAX_NEIGHBOURS = 6
static int[][] neighs
static final Random rng = new Random()
static int[] x
static int[] y

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index