Exemple #1
0
 public void SetUp()
 {
     _chessBoard = new ChessBoard();
     _pawn = new Pawn(PieceColor.Black);
 }
Exemple #2
0
 protected override void Given()
 {
     ChessBoard = new ChessBoard();
     base.Given();
 }
Exemple #3
0
 public void SetUp()
 {
     _chessBoard = new ChessBoard();
 }
Exemple #4
0
 protected BaseMoveStrategy(ChessBoard board)
 {
     ChessBoard          = board;
     CaptureableLocation = new List <Tuple <int, int> >();
 }
Exemple #5
0
 public void SetUp()
 {
     _chessboard = new ChessBoard();
 }
Exemple #6
0
 public ColumnMoveStrategy(ChessBoard board) : base(board)
 {
 }
Exemple #7
0
 public Queen(PieceColor color, ChessBoard board)
 {
     PieceColor = color;
     ChessBoard = board;
 }
Exemple #8
0
 public DiagonalMoveStrategy(ChessBoard board) : base(board)
 {
 }
Exemple #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;
 }
 public void SetUp()
 {
     _chessBoard = new ChessBoard();
     _pawn       = new Pawn(PieceColor.Black);
 }