org.moyoman.util
Class PartialStone
java.lang.Object
|
+--org.moyoman.util.Point
|
+--org.moyoman.util.Stone
|
+--org.moyoman.util.PartialStone
- All Implemented Interfaces:
- Cloneable, Serializable
- public class PartialStone
- extends Stone
This class is used for representing fractions of stones.
For example, in evaluating the score in midgame, a particular
point might have a 60% chance of becoming black territory.
- See Also:
- Serialized Form
Field Summary |
private float |
value
The amount to count this stone, between 0.0 and 1.0. |
Fields inherited from class org.moyoman.util.Stone |
|
Fields inherited from class org.moyoman.util.Point |
|
Constructor Summary |
PartialStone(Color color,
int x,
int y,
float val)
Create the PartialStone object. |
Method Summary |
float |
getValue()
Return the value of this stone. |
value
private float value
- The amount to count this stone, between 0.0 and 1.0.
PartialStone
public PartialStone(Color color,
int x,
int y,
float val)
throws IllegalArgumentException
- Create the PartialStone object.
- Parameters:
color
- The color of the stone.x
- The horizontal coordinate of the stone.y
- The vertical coordinate of the stone.val
- The amount to count this stone.
- Throws:
IllegalArgumentException
- Thrown if value is
out of range, or if the base class catches an out of
range value.
getValue
public float getValue()
- Return the value of this stone.
This corresponds to how much this stone should count.
- Returns:
- The value of this stone.