public void Add(Pawn pawn, int xCoordinate, int yCoordinate, PieceColor pieceColor)
 {
     if (IsLegalBoardPosition(xCoordinate, yCoordinate))
     {
         pawn.XCoordinate = xCoordinate;
         pawn.YCoordinate = yCoordinate;
         pieces[xCoordinate, yCoordinate] = pawn;
     }
 }
Exemple #2
0
                protected override void Given()
                {
                    base.Given();
                    PieceColor = PieceColor.Black;
                    XCoordinate = 6;
                    YCoordinate = 3;
                    Pawn = new Pawn(PieceColor);

                    ChessBoard.Add(Pawn, XCoordinate, YCoordinate, PieceColor);
                }
Exemple #3
0
 public void SetUp()
 {
     _chessBoard = new ChessBoard();
     _pawn = new Pawn(PieceColor.Black);
 }
Exemple #4
0
 protected override void Given()
 {
     PieceColor = PieceColor.Black;
     Pawn = new Pawn(PieceColor);
     base.Given();
 }
Exemple #5
0
 public void SetUp()
 {
     _chessBoard = new ChessBoard();
     _pawn       = new Pawn(PieceColor.Black, _chessBoard);
     _chessBoard.ResetBoard();
 }