ChessApplication.ChessPiece Class
The base class for the Chess pieces, implementning common methods and create placeholders for abstract methods.

Access: Public
Base Classes: Object
Implemented interfaces: ICloneable
  Members Description  
    BlackColor The Black color/side.

 
    WhiteColor The White color/side.

 
    color The color or side of the Piece.

 
    board Reference to the ChessBoard this Piece is placed on.

 
    position The position on the board.

 
    relativeValue The relative value of the Piece

 
    movementBonus The bonus amount for the Piece

 
    nrMovePlayed Determine how many moves this piece has made

 
    ChessPiece Constructor of a ChessPiece.

 
    ChessPiece Deserialization constructor of a position on the Chessboard.

 
    Color The color or side of the Piece.

 
    Position The position on the board.

 
    RelativeValue The relative value of the Piece.

 
    GetRelativeValue The relative value of the Piece.

 
    MovementBonus The bonus amount for the Piece.

 
    HasMoved Weather the Piece has moved.

 
    NrMovePlayed Weather the Piece has moved.

 
    Clone Generate a copy of the Piece, and in case of the sub classes that class.

 
    Clone Generate a copy of the Piece, and in case of the sub classes that class.

 
    MoveTo Move the Piece to another position, but only if it's a legal move.

 
    MoveToNotChecked Move the Piece to another position without verify that it is a correct move.

 
    IsColorBlack Determine if color/side is Black.

 
    IsColorWhite Determine if color/side is White.

 
    GetAbsoluteMovability Get the total number of possible movement for this type of a piece.

 
    GetActualMovability Get the actual number of possible movement for this type of a piece at current game state.

 
    GetOppositeColor Get the color/side that is opposite to this piece.

 
    HasOppositeColor Determine if the other Piece has the opposite color.

 
    AddLegalMoves Generate all the possible legal moves for this piece at current state of the chessboard.

 
    GenerateLegalMoves Generate all the possible legal moves for this piece at current state of the chessboard.

 
    IsLegalMove Determine if a move i legal.

 
    SaveToXml Xml saving function.

 
    Equals Equality should be based on State not references.

 
    Equals Equality should be based on State not references.

 
    GetHashCode Creates a better hashcode.