Othello 1.0

edu.drexel.cs.ai.othello
Class InvalidMoveException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by edu.drexel.cs.ai.othello.InvalidMoveException
All Implemented Interfaces:
java.io.Serializable

public class InvalidMoveException
extends java.lang.RuntimeException

Thrown to indicate that a move is not valid for the given GameState.

Author:
Evan A. Sultanik
See Also:
Serialized Form

Constructor Summary
InvalidMoveException(Square move, GameState.Player player, java.lang.String message)
          Constructs an InvalidMoveException with the offending move, the player that attempted the invalid move, and a message explaining why the move was invalid.
 
Method Summary
 Square getMove()
          Returns the offending move.
 GameState.Player getPlayer()
          Returns the offending player.
 java.lang.String toString()
          Returns a string representation of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvalidMoveException

public InvalidMoveException(Square move,
                            GameState.Player player,
                            java.lang.String message)
Constructs an InvalidMoveException with the offending move, the player that attempted the invalid move, and a message explaining why the move was invalid.

Method Detail

getMove

public Square getMove()
Returns the offending move.


getPlayer

public GameState.Player getPlayer()
Returns the offending player.


toString

public java.lang.String toString()
Returns a string representation of this exception.

Overrides:
toString in class java.lang.Throwable

Othello 1.0

Copyright 2006–2007 Evan A. Sultanik