Exemplo n.º 1
0
 /// <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;
 }
Exemplo n.º 2
0
 /// <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]);
 }
Exemplo n.º 3
0
 /// <summary>
 /// The constructor.
 /// </summary>
 public Move(Location a, Location b)
 {
     this._A = a;
     this._B = b;
 }