|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.moyoman.util.Move
|
+--org.moyoman.util.RatedMove
This class represents a move which has been rated. The rating consists of two factors, the quality of the move, and the confidence in the rating. The rating varies between -1.0 and 1.0, where 1.0 is a highly rated move, and -1.0 a very bad move. The confidence varies between 0.0 and 1.0, where 1.0 indicates a high degree of confidence in the rating, and 0.0 indicates a very low degree of confidence in the rating.
| Field Summary | |
private float |
confidence
The confidence in the rating, 1.0 is very confident, 0.0 is no confidence. |
private String |
message
An optional message explaining the move, which is not null. |
private float |
rating
The rating of the move, 1.0 is very good, - 1,0 is very bad. |
| Fields inherited from class org.moyoman.util.Move |
PASS, RESIGNATION, STONE_PLAYED |
| Constructor Summary | |
RatedMove(NumberedStone stone,
float r,
float conf)
Create a new RatedMove object. |
|
RatedMove(short type,
short num,
Color color,
float r,
float conf)
Create a new RatedMove object. |
|
| Method Summary | |
Object |
clone()
Clone this object. |
int |
compareTo(Object o)
Compare a RatedMove object with this one for sorting purposes. |
float |
getConfidence()
Return the confidence in the rating. |
String |
getMessage()
Return the message for this move. |
float |
getRating()
Return the rating of the move. |
void |
setMessage(String m)
Set the message. |
String |
toString()
Return a String representation of this object. |
| Methods inherited from class org.moyoman.util.Move |
getColor, getMoveNumber, getNumberedStone, isNumberedStone, isPass, isResignation |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private float rating
private float confidence
private String message
| Constructor Detail |
public RatedMove(NumberedStone stone,
float r,
float conf)
throws IllegalArgumentException
stone - The stone which is the rated move.r - The rating of the move, which varies between -1,0 and 1.0.conf - The confidence in the rating, which varies between 0.0 and 1.0.
IllegalArgumentException - - Thrown if either the rating
or confidence are outside of their allowed ranges.
public RatedMove(short type,
short num,
Color color,
float r,
float conf)
throws IllegalArgumentException
type - - either Move.PASS, or Move.RESIGNATION.num - - The move number.color - - The color of the move.r - The rating of the move, which varies between -1.0 and 1.0.conf - The confidence in the rating, which varies between 0.0 and 1.0.
IllegalArgumentException - - Thrown if either the rating
or confidence are outside of their allowed ranges.| Method Detail |
public void setMessage(String m)
m - The message.public float getRating()
public float getConfidence()
public String getMessage()
public int compareTo(Object o)
compareTo in interface Comparableo - An Object which should be a RatedMove.
public String toString()
toString in class Movepublic Object clone()
clone in class Move
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||