|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.moyoman.util.Handicap
This class represents a set of handicap stones.
Field Summary | |
private boolean |
fixed
True if handicap in fixed position, or false. |
private static int |
MAX_STONES
The maximum number of handicap stones. |
private Stone[] |
stones
|
private int |
total
The total number of handicap stones. |
Constructor Summary | |
Handicap(int number)
Create the Handicap object with the appropriate number of stones. |
Method Summary | |
Stone[] |
getStones()
|
int |
getTotal()
Return the size of the handicap. |
boolean |
isFixed()
Determine whether the handicap stones are placed freely, or according to the standard pattern. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final int MAX_STONES
private Stone[] stones
private boolean fixed
private int total
Constructor Detail |
public Handicap(int number) throws IllegalArgumentException
number
- The number of handicap stones.
IllegalArgumentException
- Thrown if the number of stones
selected is not in the range of 0 to MAX_STONES.Method Detail |
public Stone[] getStones()
public int getTotal()
public boolean isFixed()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |