|
JSettlers v1.0.6 API Built ${date} |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsoc.game.SOCBoard
This is a representation of the board in Settlers of Catan.
Field Summary | |
static int |
CLAY_HEX
|
static int |
CLAY_PORT
|
static int |
CLAY_PORT_HEX
|
static int |
DESERT_HEX
|
static int |
MAXEDGE
largest value for an edge |
static int |
MAXHEX
largest value for a hex |
static int |
MAXNODE
largest value for a node |
static int |
MAXNODEPLUSONE
largest value for a node plus one |
static int |
MINEDGE
smallest value for an edge |
static int |
MINHEX
smallest value for a hex |
static int |
MINNODE
smallest value for a node |
static int |
MISC_PORT
|
static int |
MISC_PORT_HEX
|
protected java.util.Hashtable |
nodesOnBoard
a list of nodes on the board |
static int |
ORE_HEX
|
static int |
ORE_PORT
|
static int |
ORE_PORT_HEX
|
static int |
SHEEP_HEX
|
static int |
SHEEP_PORT
|
static int |
SHEEP_PORT_HEX
|
static int |
WATER_HEX
|
static int |
WHEAT_HEX
|
static int |
WHEAT_PORT
|
static int |
WHEAT_PORT_HEX
|
static int |
WOOD_HEX
|
static int |
WOOD_PORT
|
static int |
WOOD_PORT_HEX
|
Constructor Summary | |
SOCBoard()
Create a new Settlers of Catan Board |
Method Summary | |
java.lang.String |
edgeCoordToString(int edge)
|
static java.util.Vector |
getAdjacentEdgesToEdge(int coord)
|
static java.util.Vector |
getAdjacentEdgesToNode(int coord)
|
static java.util.Vector |
getAdjacentHexesToNode(int coord)
|
static java.util.Vector |
getAdjacentNodesToEdge(int coord)
|
static java.util.Vector |
getAdjacentNodesToNode(int coord)
|
java.util.Vector |
getCities()
get the list of cities |
int[] |
getHexLayout()
|
int |
getHexTypeFromCoord(int hex)
Given a hex coordinate, return the type of hex |
int |
getHexTypeFromNumber(int hex)
Given a hex number, return the type of hex |
int[] |
getNumberLayout()
|
int |
getNumberOnHexFromCoord(int hex)
Given a hex coordinate, return the number on that hex |
int |
getNumberOnHexFromNumber(int hex)
Given a hex number, return the number on that hex |
java.util.Vector |
getPieces()
get the list of pieces on the board |
java.util.Vector |
getPortCoordinates(int portType)
|
int |
getPortTypeFromHex(int hex)
|
java.util.Vector |
getRoads()
get the list of roads |
int |
getRobberHex()
|
java.util.Vector |
getSettlements()
get the list of settlements |
boolean |
isNodeOnBoard(int node)
|
void |
makeNewBoard()
Shuffle the hex tiles and layout a board |
java.lang.String |
nodeCoordToString(int node)
|
void |
putPiece(SOCPlayingPiece pp)
put a piece on the board |
void |
removePiece(SOCPlayingPiece piece)
remove a piece from the board |
void |
setHexLayout(int[] hl)
set the hexLayout |
void |
setNumberLayout(int[] nl)
set the number layout |
void |
setRobberHex(int rh)
set where the robber is |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DESERT_HEX
public static final int CLAY_HEX
public static final int ORE_HEX
public static final int SHEEP_HEX
public static final int WHEAT_HEX
public static final int WOOD_HEX
public static final int WATER_HEX
public static final int MISC_PORT_HEX
public static final int CLAY_PORT_HEX
public static final int ORE_PORT_HEX
public static final int SHEEP_PORT_HEX
public static final int WHEAT_PORT_HEX
public static final int WOOD_PORT_HEX
public static final int MISC_PORT
public static final int CLAY_PORT
public static final int ORE_PORT
public static final int SHEEP_PORT
public static final int WHEAT_PORT
public static final int WOOD_PORT
public static final int MAXHEX
public static final int MINHEX
public static final int MAXEDGE
public static final int MINEDGE
public static final int MAXNODE
public static final int MINNODE
public static final int MAXNODEPLUSONE
protected java.util.Hashtable nodesOnBoard
Constructor Detail |
public SOCBoard()
Method Detail |
public void makeNewBoard()
public int[] getHexLayout()
public int[] getNumberLayout()
public int getRobberHex()
public void setHexLayout(int[] hl)
hl
- the hex layoutpublic int getPortTypeFromHex(int hex)
hex
- the hex type
public void setNumberLayout(int[] nl)
nl
- the number layoutpublic void setRobberHex(int rh)
rh
- the robber hexpublic java.util.Vector getPortCoordinates(int portType)
portType
- the type of port
public int getNumberOnHexFromCoord(int hex)
hex
- the coordinates for a hex
public int getNumberOnHexFromNumber(int hex)
hex
- the number of a hex
public int getHexTypeFromCoord(int hex)
hex
- the coordinates for a hex
public int getHexTypeFromNumber(int hex)
hex
- the number of a hex
public void putPiece(SOCPlayingPiece pp)
public void removePiece(SOCPlayingPiece piece)
public java.util.Vector getPieces()
public java.util.Vector getRoads()
public java.util.Vector getSettlements()
public java.util.Vector getCities()
public static java.util.Vector getAdjacentNodesToEdge(int coord)
public static java.util.Vector getAdjacentEdgesToEdge(int coord)
public static java.util.Vector getAdjacentHexesToNode(int coord)
public static java.util.Vector getAdjacentEdgesToNode(int coord)
public static java.util.Vector getAdjacentNodesToNode(int coord)
public boolean isNodeOnBoard(int node)
public java.lang.String nodeCoordToString(int node)
public java.lang.String edgeCoordToString(int edge)
|
JSettlers v1.0.6 API Built ${date} |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |