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