|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A class that implements this interface is computing information about a single group of stones, where a group of stones is defined as the maximal set of stones of one color that is captured as a unit.
Method Summary | |
Object |
clone()
|
Stone[] |
getAdjacentOpponentStones()
Get all of the opponents stones adjacent to this group. |
Stone |
getAnyStone()
Return one of the stones in the group. |
Color |
getColor()
Get the color of the stones in this group. |
Point[] |
getLiberties()
Get all points which are liberties of this group. |
int |
getMaxX()
Get the largest horizontal value for a stone in this group. |
int |
getMaxY()
Get the largest vertical value for a stone in this group. |
int |
getMinX()
Get the smallest horizontal value for a stone in this group. |
int |
getMinY()
Get the smallest vertical value for a stone in this group. |
Stone[] |
getStones()
Get all of the stones in the group. |
short |
getTotalLiberties()
Get the total number of liberties for this group. |
short |
getTotalStones()
Get the total number of stones in this group. |
boolean |
isInSingleGroup(Stone stone)
Return whether the stone is contained in this group. |
boolean |
isLibertyOfSingleGroup(Point pt)
Return whether this point is a liberty of the group. |
void |
recompute(Board board)
Recompute all information for this group. |
Method Detail |
public boolean isInSingleGroup(Stone stone)
stone
- The stone in question.
public boolean isLibertyOfSingleGroup(Point pt)
pt
- The point in question.
public Stone getAnyStone()
public Stone[] getStones()
public short getTotalStones()
public Point[] getLiberties()
public short getTotalLiberties()
public Stone[] getAdjacentOpponentStones()
public Color getColor()
public int getMaxX()
public int getMinX()
public int getMinY()
public int getMaxY()
public void recompute(Board board)
public Object clone()
clone
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |