本文整理汇总了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);
}
示例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")
);
}
示例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")
);
}
示例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);
}
示例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);
}