|
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.SOCPlayerNumbers
This class tracks what numbers a player's pieces are touching
Constructor Summary | |
SOCPlayerNumbers()
the constructor |
|
SOCPlayerNumbers(SOCPlayerNumbers numbers)
make a copy of the player numbers |
Method Summary | |
void |
addNumberForResource(int number,
int resource,
int hex)
set a number for a resource |
void |
clear()
clear all of the data |
SOCPlayerNumbers |
copy()
return a copy of this object |
java.util.Vector |
getNumberResourcePairsForHex(int hex)
|
java.util.Vector |
getNumbersForResource(int resource)
|
java.util.Vector |
getNumbersForResource(int resource,
int robberHex)
|
java.util.Vector |
getResourcesForNumber(int num)
|
java.util.Vector |
getResourcesForNumber(int number,
int robberHex)
|
boolean |
hasNumber(int number)
return true if this player is touching the requested number |
java.lang.String |
toString()
return a human readable form of this object |
void |
undoAddNumberForResource(int number,
int resource,
int hex)
remove a number for a resource do this when you take back a piece |
void |
undoUpdateNumbers(int coord,
SOCBoard board)
undo the updating of the numbers data given a coordinate and a board, remove numbers for this player from the list |
void |
undoUpdateNumbers(SOCPlayingPiece piece,
SOCBoard board)
undo the updating of the numbers data given a piece and a board, remove numbers for this player from the list |
void |
updateNumbers(int coord,
SOCBoard board)
update the numbers data given a coordinate and a board, add numbers for this player to the list |
void |
updateNumbers(SOCPlayingPiece piece,
SOCBoard board)
update the numbers data given a piece and a board, add numbers for this player to the list |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SOCPlayerNumbers(SOCPlayerNumbers numbers)
numbers
- the player numbers to copypublic SOCPlayerNumbers()
Method Detail |
public void clear()
public void updateNumbers(SOCPlayingPiece piece, SOCBoard board)
piece
- the playing pieceboard
- the game boardpublic void updateNumbers(int coord, SOCBoard board)
coord
- the coordinateboard
- the game boardpublic java.util.Vector getResourcesForNumber(int num)
num
- the number
public java.util.Vector getNumbersForResource(int resource)
resource
- the resource
public java.util.Vector getNumberResourcePairsForHex(int hex)
hex
- the hex coord
public java.util.Vector getNumbersForResource(int resource, int robberHex)
resource
- the resourcerobberHex
- the robber hex
public java.util.Vector getResourcesForNumber(int number, int robberHex)
number
- the resourcerobberHex
- the robber hex
public void addNumberForResource(int number, int resource, int hex)
number
- the numberresource
- the resourcehex
- the hexpublic void undoUpdateNumbers(SOCPlayingPiece piece, SOCBoard board)
piece
- the playing pieceboard
- the game boardpublic void undoUpdateNumbers(int coord, SOCBoard board)
coord
- the coordinateboard
- the game boardpublic void undoAddNumberForResource(int number, int resource, int hex)
number
- the numberresource
- the resourcehex
- the hexpublic boolean hasNumber(int number)
number
- the number
public SOCPlayerNumbers copy()
public java.lang.String toString()
|
JSettlers v1.0.6 API Built ${date} |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |