/// <summary> /// The constructor. /// </summary> /// <param name="board">The board in which the square is located.</param> /// <param name="location">The location of the square.</param> /// <param name="color">The color of the square.</param> /// <param name="piece">The Chess piece that is on the square.</param> public Square(ChessBoard board, Location location, ChessColor color, ChessPiece piece = null) { this.Board = board; this.Location = location; this.Color = color; this.Piece = piece; }
/// <summary> /// The constructor. /// </summary> /// <param name="chessPiece">The Chess piece that the movement belongs to.</param> public KnightMovement(ChessPiece chessPiece) : base(chessPiece) { }
public TempPiece(ChessPiece piece) { this.Piece = piece; if (this.Piece != null) this.MoveCount = piece.MoveCount; }
/// <summary> /// The constructor. /// </summary> /// <param name="chessPiece">The Chess piece that the movement belongs to.</param> public PawnMovement(ChessPiece chessPiece) : base(chessPiece) { }
/// <summary> /// The constructor. /// </summary> /// <param name="chessPiece">The Chess piece that the movement belongs to.</param> /// <param name="direction">The direction(s) that the Chess piece is able move into.</param> public RowMovement(ChessPiece chessPiece, MovementDirection direction) : base(chessPiece) { this.Direction = direction; }
/// <summary> /// The constructor. /// </summary> /// <param name="chessPiece">The Chess piece that the movement belongs to.</param> public KingMovement(ChessPiece chessPiece) : base(chessPiece) { }
/// <summary> /// The constructor. /// </summary> /// <param name="chessPiece">The Chess piece that the movement behaviour belongs to is on.</param> public MovementBehaviour(ChessPiece chessPiece) { this.Board = chessPiece.Board; this.Piece = chessPiece; }