|
|||||||||
| Home >> All >> [ cgsuite overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
cgsuite
Class Stop

java.lang.Objectcgsuite.Stop
- public class Stop
- extends java.lang.Object
The left or right stop of a game. An instance of Stop contains
the following information:
- The value of the stop. For loopy games, this may be POSITIVE_INFINITY 55 or NEGATIVE_INFINITY 55 to indicate that the stopping position is ON 55 or OFF 55 , respectively;
- The player whose turn it is to move when the stopping position is reached.
| Field Summary | |
static int |
STOP_TYPE_EITHER
Indicates that the player in question can determine who has the move when the stopping position is reached. |
static int |
STOP_TYPE_LEFT
Indicates that it is left's turn to move when the stopping position is reached. |
static int |
STOP_TYPE_RIGHT
Indicates that it is right's turn to move when the stopping position is reached. |
private DyadicRational |
stoppingValue
|
private int |
stopType
|
| Constructor Summary | |
Stop(DyadicRational initStoppingValue,
int initStopType)
Constructs a new Stop with the given value and type. |
|
| Method Summary | |
DyadicRational |
getStoppingValue()
Gets the value of this stop. |
int |
getStopType()
Gets the stop type, indicating who has the move when the stopping position is reached. |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
STOP_TYPE_LEFT
public static final int STOP_TYPE_LEFT
- Indicates that it is left's turn to move when the stopping position is
reached.
- See Also:
- Constant Field Values
STOP_TYPE_RIGHT
public static final int STOP_TYPE_RIGHT
- Indicates that it is right's turn to move when the stopping position is
reached.
- See Also:
- Constant Field Values
STOP_TYPE_EITHER
public static final int STOP_TYPE_EITHER
- Indicates that the player in question can determine who has the move
when the stopping position is reached.
- See Also:
- Constant Field Values
stoppingValue
private DyadicRational stoppingValue
stopType
private int stopType
| Constructor Detail |
Stop
public Stop(DyadicRational initStoppingValue, int initStopType)
- Constructs a new
Stopwith the given value and type.
| Method Detail |
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
getStoppingValue
public DyadicRational getStoppingValue()
- Gets the value of this stop. For loopy games, the value may be
POSITIVE_INFINITY 55 or
NEGATIVE_INFINITY 55 to indicate that the
stopping position is ON 55 or
OFF 55 , respectively.
getStopType
public int getStopType()
- Gets the stop type, indicating who has the move when the stopping
position is reached. The value is one of the following:
STOP_TYPE_LEFT- It is left's turn to move when the stopping position is reached.
STOP_TYPE_RIGHT- It is right's turn to move when the stopping position is reached.
STOP_TYPE_EITHER- The player in question can determine whose turn it is to move when the stopping position is reached.
|
|||||||||
| Home >> All >> [ cgsuite overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
cgsuite.Stop