org.jscience.computing.game.checkers
Class CheckersGame

java.lang.Object
  extended by org.jscience.computing.game.AbstractGame
      extended by org.jscience.computing.game.checkers.CheckersGame
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, GamePlay

public class CheckersGame
extends AbstractGame

an implementation of the game checkers.

See Also:
Serialized Form

Constructor Summary
CheckersGame()
          Creates a new CheckersGame object.
CheckersGame(java.lang.String name)
          Creates a new CheckersGame object.
 
Method Summary
 java.lang.Object clone()
          DOCUMENT ME!
 boolean equals(java.lang.Object obj)
          DOCUMENT ME!
 org.jscience.computing.game.checkers.CheckersBoard getBoard()
          DOCUMENT ME!
 int[] getWinner()
          DOCUMENT ME!
protected  GameMove[] listLegalMoves()
          DOCUMENT ME!
 int nextPlayer()
          DOCUMENT ME!
protected  boolean popMove()
          DOCUMENT ME!
protected  boolean pushMove(GameMove move)
          DOCUMENT ME!
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.computing.game.AbstractGame
clearRedoList, gameOver, getGameName, getLastMove, getLastPlayer, getLegalMoves, getLegalMoves, getMoveHistory, getNumberOfRedoMoves, getRedoList, getResult, isLegalMove, isWinner, loadFromFile, makeMove, numberOfMoves, numberOfPlayers, redoMove, resetLegalMoves, resetLists, saveToFile, spawnChild, undoLastMove, undoMoves
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckersGame

public CheckersGame()
Creates a new CheckersGame object.


CheckersGame

public CheckersGame(java.lang.String name)
Creates a new CheckersGame object.

Parameters:
name - DOCUMENT ME!
Method Detail

listLegalMoves

protected GameMove[] listLegalMoves()
DOCUMENT ME!

Specified by:
listLegalMoves in class AbstractGame
Returns:
DOCUMENT ME!

pushMove

protected boolean pushMove(GameMove move)
DOCUMENT ME!

Specified by:
pushMove in class AbstractGame
Parameters:
move - DOCUMENT ME!
Returns:
DOCUMENT ME!

popMove

protected boolean popMove()
DOCUMENT ME!

Specified by:
popMove in class AbstractGame
Returns:
DOCUMENT ME!

nextPlayer

public int nextPlayer()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getWinner

public int[] getWinner()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getBoard

public org.jscience.computing.game.checkers.CheckersBoard getBoard()
DOCUMENT ME!

Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class AbstractGame
Returns:
DOCUMENT ME!

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
DOCUMENT ME!

Specified by:
clone in interface GamePlay
Overrides:
clone in class AbstractGame
Returns:
DOCUMENT ME!
Throws:
java.lang.CloneNotSupportedException - DOCUMENT ME!
See Also:
AbstractGame.spawnChild(GameMove)

equals

public boolean equals(java.lang.Object obj)
DOCUMENT ME!

Overrides:
equals in class java.lang.Object
Parameters:
obj - DOCUMENT ME!
Returns:
DOCUMENT ME!