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


C# Side.GetDiscoverdStraightAttackMoves方法代码示例

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


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

示例1: GetDiscoveredStraightAttackMoves_RookE1PawnE3TargetE7_ReturnsEmpty

        public void GetDiscoveredStraightAttackMoves_RookE1PawnE3TargetE7_ReturnsEmpty()
        {
            // arrange
            var s = new Side("G1",
                new PieceSet<Queen>(),
                new PieceSet<Bishop>(),
                new PieceSet<Knight>(),
                new PieceSet<Rook>(new Square("E1")),
                new WhitePawns(Bitboard.With.A3.Build())
                );

            // act
            var result = s.GetDiscoverdStraightAttackMoves(new Square("E7"), Bitboard.Empty);

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

示例2: GetDiscoveredStraightAttackMoves_RookE1PawnE3EnemyD4TargetE7_ReturnsE3D4

        public void GetDiscoveredStraightAttackMoves_RookE1PawnE3EnemyD4TargetE7_ReturnsE3D4()
        {
            // arrange
            var s = new Side("G1",
                new PieceSet<Queen>(),
                new PieceSet<Bishop>(),
                new PieceSet<Knight>(),
                new PieceSet<Rook>(new Square("E1")),
                new WhitePawns(Bitboard.With.Rank2.E3.Except.E2.Build())
                );

            // act
            var result = s.GetDiscoverdStraightAttackMoves(new Square("E7"), new Square("D4").AsBoard);

            // assert
            result.Should().Have.SameSequenceAs(
                new Move("E3", "D4")
                );
        }
开发者ID:juanplopes,项目名称:StrongChess,代码行数:19,代码来源:SideTests.cs

示例3: GetDiscoveredStraightAttackMoves_RookA4PawnB4TargetE4_ReturnsB4B5

        public void GetDiscoveredStraightAttackMoves_RookA4PawnB4TargetE4_ReturnsB4B5()
        {
            // arrange
            var s = new Side("G1",
                new PieceSet<Queen>(),
                new PieceSet<Bishop>(),
                new PieceSet<Knight>(),
                new PieceSet<Rook>(new Square("A4")),
                new WhitePawns(Bitboard.With.Rank2.B4.Except.B2.Build())
                );

            // act
            var result = s.GetDiscoverdStraightAttackMoves(new Square("E4"), Bitboard.Empty);

            // assert
            result.Should().Have.SameSequenceAs(
                new Move("B4", "B5")
                );
        }
开发者ID:juanplopes,项目名称:StrongChess,代码行数:19,代码来源:SideTests.cs

示例4: GetDiscoveredStraightAttackMoves_RookE1KnightE2TargetE7_AllKnightMoves

        public void GetDiscoveredStraightAttackMoves_RookE1KnightE2TargetE7_AllKnightMoves()
        {
            // arrange
            var s = new Side("A1",
                new PieceSet<Queen>(),
                new PieceSet<Bishop>(),
                new PieceSet<Knight>(new Square("E2")),
                new PieceSet<Rook>(new Square("E1")),
                new WhitePawns()
                );

            var expected = new PieceSet<Knight>(new Square("E2")).GetMoves(Bitboard.Empty, Bitboard.Empty);

            // act
            var result = s.GetDiscoverdStraightAttackMoves(new Square("E7"), Bitboard.Empty);

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

示例5: GetDiscoveredStraightAttackMoves_RookE1KingE3TargetE7

        public void GetDiscoveredStraightAttackMoves_RookE1KingE3TargetE7()
        {
            // arrange
            var s = new Side("E3",
                             new PieceSet<Queen>(),
                             new PieceSet<Bishop>(),
                             new PieceSet<Knight>(),
                             new PieceSet<Rook>(new Square("E1")),
                             new WhitePawns()
                );

            IEnumerable<Move> expected = new PieceSet<King>(new Square("E3")).GetMoves(Bitboard.Empty, Bitboard.Empty,
                                                                                       Bitboard.Full,
                                                                                       ~Bitboard.With.FileE.Build());

            // act
            IEnumerable<Move> result = s.GetDiscoverdStraightAttackMoves(new Square("E7"), Bitboard.Empty);

            // assert
            result.Should().Have.SameSequenceAs(expected);
        }
开发者ID:ElemarJR,项目名称:StrongChess,代码行数:21,代码来源:SideTests.cs


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