public override void DeltaPattern()
        {
            const int index       = (int)EBands.Delta;
            const int sliderIndex = 0;
            var       expected    = BishopExpected[index];
            var       actuals     = Bands[index].Select(x => SlideAttacks[sliderIndex](x, BitBoard.Empty).Count);

            actuals.Should().AllBeEquivalentTo(expected);
        }
        public override void GammaPattern()
        {
            const int index       = (int)EBands.Gamma;
            const int sliderIndex = 1;
            var       expected    = RookExpected[index];
            var       actuals     = Bands[index].Select(x => SlideAttacks[sliderIndex](sliderIndex, BitBoard.Empty).Count);

            actuals.Should().AllBeEquivalentTo(expected);
        }
示例#3
0
        public override void DeltaPattern()
        {
            const int index       = (int)EBands.Delta;
            const int sliderIndex = 1;

            foreach (var pieceLocation in Bands[index])
            {
                var attacks = SlideAttacks[sliderIndex](pieceLocation, EmptyBoard);
                Assert.Equal(RookExpected[index], attacks.Count);
            }
        }
示例#4
0
        public override void DeltaPattern()
        {
            const int index       = (int)EBands.Delta;
            const int sliderIndex = 2;
            var       expected    = BishopExpected[index] + RookExpected[index];
            var       actuals     = Bands[index].Select(x => SlideAttacks[sliderIndex](x, BitBoards.EmptyBitBoard).Count);

            foreach (var actual in actuals)
            {
                Assert.Equal(expected, actual);
            }
        }