Пример #1
0
 public void SetUp()
 {
     _chessBoard = new ChessBoard();
     _pawn = new Pawn(PieceColor.Black);
 }
Пример #2
0
 protected override void Given()
 {
     ChessBoard = new ChessBoard();
     base.Given();
 }
Пример #3
0
 public void SetUp()
 {
     _chessBoard = new ChessBoard();
 }
Пример #4
0
 protected BaseMoveStrategy(ChessBoard board)
 {
     ChessBoard          = board;
     CaptureableLocation = new List <Tuple <int, int> >();
 }
Пример #5
0
 public void SetUp()
 {
     _chessboard = new ChessBoard();
 }
Пример #6
0
 public ColumnMoveStrategy(ChessBoard board) : base(board)
 {
 }
Пример #7
0
 public Queen(PieceColor color, ChessBoard board)
 {
     PieceColor = color;
     ChessBoard = board;
 }
Пример #8
0
 public DiagonalMoveStrategy(ChessBoard board) : base(board)
 {
 }
Пример #9
0
 /// <summary>
 /// Constructor for Pawns, containing the board and the piece color.
 /// </summary>
 /// <param name="pieceColor">White or black</param>
 /// <param name="chessboard">Chessboard is needed for when Pawns are trying to
 /// determine their legal moves</param>
 /// <remarks>I had to add this constructor, in my logic to validate the correct moves and determine
 /// legal positions</remarks>
 public Pawn(PieceColor pieceColor, ChessBoard chessboard)
 {
     _pieceColor = pieceColor;
     _chessBoard = chessboard;
 }
Пример #10
0
 public void SetUp()
 {
     _chessBoard = new ChessBoard();
     _pawn       = new Pawn(PieceColor.Black);
 }