Пример #1
0
        public void GetsCorrectAttackSquaresForSingleBlackPawn(Square pawnSquare, ulong expectedAttackSquares)
        {
            // Act
            var attackSquares = PawnMoves.BlackPawnAttacks(pawnSquare);

            // Assert
            Assert.Equal <Bitboard>(expectedAttackSquares, attackSquares);
        }
Пример #2
0
 public void ThrowsExceptionIfPawnIsOnFirstOrLastRank(Square pawnSquare)
 {
     // Act & Assert
     Assert.Throws <ArgumentOutOfRangeException>(() => PawnMoves.WhitePawnAttacks(pawnSquare));
     Assert.Throws <ArgumentOutOfRangeException>(() => PawnMoves.BlackPawnAttacks(pawnSquare));
 }