net.sourceforge.simplegamenet.chess
Class ChessPiece

java.lang.Object
  extended bynet.sourceforge.simplegamenet.chess.ChessPiece
All Implemented Interfaces:
ChessGridSize, Cloneable, Serializable
Direct Known Subclasses:
ChessBishop, ChessKing, ChessKnight, ChessPawn, ChessQueen, ChessRook

public abstract class ChessPiece
extends Object
implements ChessGridSize, Serializable, Cloneable

See Also:
Serialized Form

Field Summary
protected  int participantOwnerIndex
           
protected  int x
           
protected  int y
           
 
Fields inherited from interface net.sourceforge.simplegamenet.chess.ChessGridSize
GRID_HEIGHT, GRID_WIDTH
 
Constructor Summary
protected ChessPiece(int participantOwnerIndex, int x, int y)
           
 
Method Summary
 Object clone()
           
 void doMove(ChessPiece[] pieceGrid, int destinationX, int destinationY)
           
 int getParticipantsOwnerIndex()
           
abstract  int getPieceType()
           
abstract  int getPieceValue()
           
 int getX()
           
 int getY()
           
 boolean isInPlayField()
           
abstract  boolean isMoveAllowed(ChessPiece[] pieceGrid, int destinationX, int destinationY)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

participantOwnerIndex

protected int participantOwnerIndex

x

protected int x

y

protected int y
Constructor Detail

ChessPiece

protected ChessPiece(int participantOwnerIndex,
                     int x,
                     int y)
Method Detail

isMoveAllowed

public abstract boolean isMoveAllowed(ChessPiece[] pieceGrid,
                                      int destinationX,
                                      int destinationY)

doMove

public void doMove(ChessPiece[] pieceGrid,
                   int destinationX,
                   int destinationY)

getParticipantsOwnerIndex

public int getParticipantsOwnerIndex()

isInPlayField

public boolean isInPlayField()

getX

public int getX()

getY

public int getY()

clone

public Object clone()

getPieceType

public abstract int getPieceType()

getPieceValue

public abstract int getPieceValue()


Copyright © 2003-2004 The 3 Belgians. All Rights Reserved.