예제 #1
0
        public void Initialize_IsBlackCorrectPlaced_Equal()
        {
            ulong        correctPlacement = 0x00FF000000000000;
            PawnBitBoard board            = new PawnBitBoard(ChessPieceColors.Black);

            board.Initialize(null);

            Assert.Equal(correctPlacement, (ulong)board.Bits);
        }
예제 #2
0
        public void Bits_BlackMovedTwoSquaresOneMove_Equal()
        {
            BoardSquare  correct = BoardSquare.H5;
            PawnBitBoard board   = new PawnBitBoard(ChessPieceColors.Black);

            board.Initialize(null);

            /* "Perform" move, triggers the Bits property on pawnbitboard that sets the MovedTwoSquares */
            board.Bits = BoardSquare.A7 | BoardSquare.B7 | BoardSquare.C7 | BoardSquare.D7 | BoardSquare.E7 | BoardSquare.F7 | BoardSquare.G7 | BoardSquare.H5;

            Assert.Equal(correct, board.MovedTwoSquares);
        }
예제 #3
0
        public void Bits_WhiteMovedTwoSquaresOneMove_Equal()
        {
            BoardSquare  correct = BoardSquare.H4;
            PawnBitBoard board   = new PawnBitBoard(ChessPieceColors.White);

            board.Initialize(null);

            /* "Perform" move, triggers the Bits property on pawnbitboard that sets the MovedTwoSquares */
            board.Bits = BoardSquare.A2 | BoardSquare.B2 | BoardSquare.C2 | BoardSquare.D2 | BoardSquare.E2 | BoardSquare.F2 | BoardSquare.G2 | BoardSquare.H4;

            Assert.Equal(correct, board.MovedTwoSquares);
        }