org.moyoman.util
Class IllegalMoveException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.moyoman.util.IllegalMoveException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
IllegalKoException, IllegalSuperKoException, OccupiedPointException, SuicideException, WrongColorException

public class IllegalMoveException
extends Exception

This exception is thrown when an illegal move is made. Derived classes of this one correspond to the specific types of illegal moves, such as illegally retaking a ko, or commiting suicide.

See Also:
Serialized Form

Field Summary
private  Stone stone
          The stone that was illegally played.
 
Fields inherited from class java.lang.Exception
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
IllegalMoveException(Stone st)
          Create the IllegalMoveException object.
 
Method Summary
 Stone getStone()
          Get the stone that caused the exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stone

private Stone stone
The stone that was illegally played.

Constructor Detail

IllegalMoveException

public IllegalMoveException(Stone st)
Create the IllegalMoveException object.

Parameters:
st - The stone that was illegally played.
Method Detail

getStone

public Stone getStone()
Get the stone that caused the exception.

Returns:
A Stone object.