public ChessMove(int fromIndex, int toIndex, ChessPiece pieceMoved, ChessPiece pieceTaken = null) { this.FromIndex = fromIndex; this.ToIndex = toIndex; this.PieceMoved = pieceMoved; this.PieceTaken = pieceTaken; }
private int GetValueOfPiece(ChessPiece piece) { if (piece == null) { return 0; } int multiplier = 1; if (piece.Colour == ChessColour.Black) { multiplier = -1; } return multiplier * PieceValues[piece.GetType()]; }
public BoardLocation(ChessColour color, ChessPiece piece = null) { this._colour = color; this.Piece = piece; }
private void ChangeChessPiece(int row, int column, ChessPiece chessPiece) { this.Locations[row * 8 + column].Piece = chessPiece; }