示例#1
0
文件: Square.cs 项目: mygibbs/Chess
 /// <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;
 }
示例#2
0
 /// <summary>
 /// The constructor.
 /// </summary>
 /// <param name="chessPiece">The Chess piece that the movement belongs to.</param>
 public KnightMovement(ChessPiece chessPiece)
     : base(chessPiece)
 {
 }
示例#3
0
 public TempPiece(ChessPiece piece)
 {
     this.Piece = piece;
     if (this.Piece != null) this.MoveCount = piece.MoveCount;
 }
示例#4
0
 /// <summary>
 /// The constructor.
 /// </summary>
 /// <param name="chessPiece">The Chess piece that the movement belongs to.</param>
 public PawnMovement(ChessPiece chessPiece)
     : base(chessPiece)
 {
 }
示例#5
0
 /// <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;
 }
示例#6
0
 /// <summary>
 /// The constructor.
 /// </summary>
 /// <param name="chessPiece">The Chess piece that the movement belongs to.</param>
 public KingMovement(ChessPiece chessPiece)
     : base(chessPiece)
 {
 }
示例#7
0
 /// <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;
 }