/// <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> /// Moves the piece on the current square to the specified location. /// </summary> /// <param name="l">The location.</param> /// <returns>Whether or not the move was successful.</returns> public bool To(Location l) { return this.To(this.Board[l]); }
/// <summary> /// The constructor. /// </summary> public Move(Location a, Location b) { this._A = a; this._B = b; }