当前位置: 首页>>代码示例>>C#>>正文


C# Side.GetDiscoveredDiagonalAttackMoves方法代码示例

本文整理汇总了C#中Side.GetDiscoveredDiagonalAttackMoves方法的典型用法代码示例。如果您正苦于以下问题:C# Side.GetDiscoveredDiagonalAttackMoves方法的具体用法?C# Side.GetDiscoveredDiagonalAttackMoves怎么用?C# Side.GetDiscoveredDiagonalAttackMoves使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Side的用法示例。


在下文中一共展示了Side.GetDiscoveredDiagonalAttackMoves方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetDiscoveredDiagonalAttackMoves_BishopH8BlackPawnsInitialPositionTargetInC3

        public void GetDiscoveredDiagonalAttackMoves_BishopH8BlackPawnsInitialPositionTargetInC3()
        {
            // arrange
            var s = new Side("G8",
                new PieceSet<Queen>(),
                new PieceSet<Bishop>(Bitboard.With.H8),
                new PieceSet<Knight>(),
                new PieceSet<Rook>(),
                BlackPawns.InitialPosition
                );

            //var expected = Bitboard.With.F4.G4.E3.G3.E2.F2.Build();

            // arrange
            var moves = s.GetDiscoveredDiagonalAttackMoves("C3", Bitboard.Empty);

            // assert
            moves.Should().Have.SameSequenceAs(
                new Move("G7", "G6"),
                new Move("G7", "G5")
                );
        }
开发者ID:juanplopes,项目名称:StrongChess,代码行数:22,代码来源:SideTests.cs

示例2: GetDiscoveredDiagonalAttackMoves_BishopH8KingF6TargetInC3

        public void GetDiscoveredDiagonalAttackMoves_BishopH8KingF6TargetInC3()
        {
            // arrange
            var s = new Side("F6",
                new PieceSet<Queen>(),
                new PieceSet<Bishop>(Bitboard.With.H8),
                new PieceSet<Knight>(),
                new PieceSet<Rook>(),
                new WhitePawns()
                );

            var expected = Bitboard.With.F7.E7.G6.E6.F5.G5.Build();

            // arrange
            var moves = s.GetDiscoveredDiagonalAttackMoves("C3", Bitboard.Empty).AsMoveboard();

            // assert
            moves.Should().Be(expected);
        }
开发者ID:juanplopes,项目名称:StrongChess,代码行数:19,代码来源:SideTests.cs

示例3: GetDiscoveredDiagonalAttackMoves_BishopH1KingF3TargetInC6

        public void GetDiscoveredDiagonalAttackMoves_BishopH1KingF3TargetInC6()
        {
            // arrange
            var s = new Side("F3",
                new PieceSet<Queen>(),
                new PieceSet<Bishop>(Bitboard.With.H1),
                new PieceSet<Knight>(),
                new PieceSet<Rook>(),
                new WhitePawns()
                );

            var expected = Bitboard.With.F4.G4.E3.G3.E2.F2.Build();

            // arrange
            var moves = s.GetDiscoveredDiagonalAttackMoves("C6", Bitboard.Empty).AsMoveboard();

            // assert
            moves.Should().Be(expected);
        }
开发者ID:juanplopes,项目名称:StrongChess,代码行数:19,代码来源:SideTests.cs

示例4: GetDiscoveredDiagonalAttackMoves_BishopH8BlackPawnF6WhitePawnG5TargetInC3

        public void GetDiscoveredDiagonalAttackMoves_BishopH8BlackPawnF6WhitePawnG5TargetInC3()
        {
            // arrange
            var s = new Side("G8",
                new PieceSet<Queen>(),
                new PieceSet<Bishop>(Bitboard.With.H8),
                new PieceSet<Knight>(),
                new PieceSet<Rook>(),
                new BlackPawns(new Square("F6").AsBoard)
                );

            //var expected = Bitboard.With.F4.G4.E3.G3.E2.F2.Build();

            // arrange
            var moves = s.GetDiscoveredDiagonalAttackMoves("C3", Bitboard.With.G5.Build());

            // assert
            moves.Should().Have.SameSequenceAs(
                new Move("F6", "F5"),
                new Move("F6", "G5")
                );
        }
开发者ID:juanplopes,项目名称:StrongChess,代码行数:22,代码来源:SideTests.cs

示例5: GetDiscoveredDiagonalAttackMoves_BishopA8KingC6TargetInF3

        public void GetDiscoveredDiagonalAttackMoves_BishopA8KingC6TargetInF3()
        {
            // arrange
            var s = new Side("C6",
                new PieceSet<Queen>(),
                new PieceSet<Bishop>(Bitboard.With.A8),
                new PieceSet<Knight>(),
                new PieceSet<Rook>(),
                new WhitePawns()
                );

            var expected = Bitboard.With.C7.D7.B6.D6.B5.C5.Build();

            // arrange
            var moves = s.GetDiscoveredDiagonalAttackMoves("F3", Bitboard.Empty).AsMoveboard();

            // assert
            moves.Should().Be(expected);
        }
开发者ID:juanplopes,项目名称:StrongChess,代码行数:19,代码来源:SideTests.cs

示例6: GetDiscoveredDiagonalAttackMoves_BishopA1RookInD4A8TargetInF6

        public void GetDiscoveredDiagonalAttackMoves_BishopA1RookInD4A8TargetInF6()
        {
            // arrange
            var s = new Side("G1",
                new PieceSet<Queen>(),
                new PieceSet<Bishop>(Bitboard.With.A1),
                new PieceSet<Knight>(),
                new PieceSet<Rook>(Bitboard.With.D4.A8),
                new WhitePawns()
                );

            var expected = Bitboard.With.Rank4.FileD.Except.D4.Build();

            // arrange
            var moves = s.GetDiscoveredDiagonalAttackMoves("F6", Bitboard.Empty).AsMoveboard();

            // assert
            moves.Should().Be(expected);
        }
开发者ID:juanplopes,项目名称:StrongChess,代码行数:19,代码来源:SideTests.cs

示例7: GetDiscoveredDiagonalAttackMoves_BishopA1KnightInD4A8TargetInF6

        public void GetDiscoveredDiagonalAttackMoves_BishopA1KnightInD4A8TargetInF6()
        {
            // arrange
            var s = new Side("G1",
                new PieceSet<Queen>(),
                new PieceSet<Bishop>(Bitboard.With.A1),
                new PieceSet<Knight>(Bitboard.With.D4.A8),
                new PieceSet<Rook>(),
                new WhitePawns()
                );

            // arrange
            var moves = s.GetDiscoveredDiagonalAttackMoves("F6", Bitboard.Empty);

            // assert
            moves.Should().Have.SameSequenceAs(
                new Move("D4", "C2"),
                new Move("D4", "E2"),
                new Move("D4", "B3"),
                new Move("D4", "F3"),
                new Move("D4", "B5"),
                new Move("D4", "F5"),
                new Move("D4", "C6"),
                new Move("D4", "E6")
                );
        }
开发者ID:juanplopes,项目名称:StrongChess,代码行数:26,代码来源:SideTests.cs

示例8: GetDiscoveredDiagonalAttackMoves_BishopA1KingD4TargetInF6

        public void GetDiscoveredDiagonalAttackMoves_BishopA1KingD4TargetInF6()
        {
            // arrange
            var s = new Side("D4",
                new PieceSet<Queen>(),
                new PieceSet<Bishop>(Bitboard.With.A1),
                new PieceSet<Knight>(),
                new PieceSet<Rook>(),
                new WhitePawns()
                );

            var expected = Bitboard.With.C4.C5.D5.E4.E3.D3.Build();

            // arrange
            var moves = s.GetDiscoveredDiagonalAttackMoves("F6", Bitboard.Empty).AsMoveboard();

            // assert
            moves.Should().Be(expected);
        }
开发者ID:juanplopes,项目名称:StrongChess,代码行数:19,代码来源:SideTests.cs

示例9: GetDiscoveredDiagonalAttackMoves_BishopH1WhitePawnsInitialPositionTargetInC6

        public void GetDiscoveredDiagonalAttackMoves_BishopH1WhitePawnsInitialPositionTargetInC6()
        {
            // arrange
            var s = new Side("G1",
                             new PieceSet<Queen>(),
                             new PieceSet<Bishop>(Bitboard.With.H1),
                             new PieceSet<Knight>(),
                             new PieceSet<Rook>(),
                             WhitePawns.InitialPosition
                );

            //var expected = Bitboard.With.F4.G4.E3.G3.E2.F2.Build();

            // arrange
            IEnumerable<Move> moves = s.GetDiscoveredDiagonalAttackMoves("C6", Bitboard.Empty);

            // assert
            moves.Should().Have.SameSequenceAs(
                new Move("G2", "G3"),
                new Move("G2", "G4")
                );
        }
开发者ID:ElemarJR,项目名称:StrongChess,代码行数:22,代码来源:SideTests.cs


注:本文中的Side.GetDiscoveredDiagonalAttackMoves方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。