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.
 
Methods inherited from class org.moyoman.util.Stone
castToStone, clone, equals, get, get, getAdjacentStonesOfSameColor, getColor, hashCode, toString
 
Methods inherited from class org.moyoman.util.Point
castToPoint, get, getAdjacentPoints, getConcentricPoints, getX, getY, isInCorner, isOnSide
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

private float value
The amount to count this stone, between 0.0 and 1.0.

Constructor Detail

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.
Method Detail

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.