示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Move"/> struct.
 /// Necessary extra constructor as it can sometimes be required to only created a basic move.
 /// </summary>
 /// <param name="from">The from square/// </param>
 /// <param name="to">The to square</param>
 public Move(Square from, Square to)
     : this()
 {
     SetFromSquare(from);
     SetToSquare(to);
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Move"/> struct.
 /// Constructor mainly for use with UI quiet move generation.
 /// It contains implicit no capture piece or promotion piece.
 /// Type is implicit Quiet.
 /// </summary>
 /// <param name="piece">The piece to move</param>
 /// <param name="from">The from square</param>
 /// <param name="to">The to square</param>
 public Move(Piece piece, Square from, Square to)
     : this(from, to)
 {
     SetMovingPiece(piece);
     SetMoveType(EMoveType.Quiet);
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Move"/> struct.
 /// Constructor for capture+promotion moves
 /// </summary>
 /// <param name="piece">The moving piece</param>
 /// <param name="captured">The captured piece</param>
 /// <param name="from">The from square</param>
 /// <param name="to">The to square</param>
 /// <param name="type">The move type</param>
 /// <param name="promotedEPiece">The promotion piece</param>
 public Move(Piece piece, Piece captured, Square from, Square to, EMoveType type, Piece promotedEPiece)
     : this(piece, captured, from, to, type) => SetPromotedPiece(promotedEPiece);