Created
January 7, 2011 22:13
-
-
Save vquaiato/770209 to your computer and use it in GitHub Desktop.
Testa muitas coisas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
20 public void GetMovesOneSquareForward_A7_ReturnsPromotions() | |
21 { | |
22 var wp = new WhitePawns(new Bitboard().Set(new Square("A7"))); | |
23 var m = wp.GetMovesOneSquareForward(); | |
24 var moves = m.GetEnumerator(); | |
25 | |
26 | |
27 moves.MoveNext(); | |
28 var f1 = moves.Current; | |
29 f1.From.Should().Be(new Square("A7")); | |
30 f1.To.Should().Be(new Square("A8")); | |
31 f1.Type.Should().Be(MoveTypes.PawnToQueenPromotion); | |
32 | |
33 moves.MoveNext(); | |
34 var f2 = moves.Current; | |
35 f2.From.Should().Be(new Square("A7")); | |
36 f2.To.Should().Be(new Square("A8")); | |
37 f2.Type.Should().Be(MoveTypes.PawnToRookPromotion); | |
38 | |
39 moves.MoveNext(); | |
40 var f3 = moves.Current; | |
41 f3.From.Should().Be(new Square("A7")); | |
42 f3.To.Should().Be(new Square("A8")); | |
43 f3.Type.Should().Be(MoveTypes.PawnToBishopPromotion); | |
44 | |
45 moves.MoveNext(); | |
46 var f4 = moves.Current; | |
47 f4.From.Should().Be(new Square("A7")); | |
48 f4.To.Should().Be(new Square("A8")); | |
49 f4.Type.Should().Be(MoveTypes.PawnToKnightPromotion); | |
50 | |
51 m.Count().Should().Be(4); | |
52 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment