ChessDotNet.Tests.ChessGameTests.TestApplyMoveBlackPawn_EnPassant C# (CSharp) 메소드

TestApplyMoveBlackPawn_EnPassant() 개인적인 메소드

private TestApplyMoveBlackPawn_EnPassant ( ) : void
리턴 void
        public static void TestApplyMoveBlackPawn_EnPassant()
        {
            ChessGame cb = new ChessGame();
            Move move1 = new Move(new Position(File.B, 1), new Position(File.A, 3), Player.White);
            Move move2 = new Move(new Position(File.E, 7), new Position(File.E, 5), Player.Black);
            Move move3 = new Move(new Position(File.E, 2), new Position(File.E, 3), Player.White);
            Move move4 = new Move(new Position(File.E, 5), new Position(File.E, 4), Player.Black);
            Move move5 = new Move(new Position(File.D, 2), new Position(File.D, 4), Player.White);
            Move move6 = new Move(new Position(File.E, 4), new Position(File.D, 3), Player.Black);

            cb.ApplyMove(move1, true);
            cb.ApplyMove(move2, true);
            cb.ApplyMove(move3, true);
            cb.ApplyMove(move4, true);
            cb.ApplyMove(move5, true);
            cb.ApplyMove(move6, true);

            Piece[][] board = new Piece[8][]
            {
                new[] { rb, nb, bb, qb, kb, bb, nb, rb },
                new[] { pb, pb, pb, pb, o, pb, pb, pb },
                new[] { o, o, o, o, o, o, o, o },
                new[] { o, o, o, o, o, o, o, o },
                new[] { o, o, o, o, o, o, o, o },
                new[] { nw, o, o, pb, pw, o, o, o },
                new[] { pw, pw, pw, o, o, pw, pw, pw },
                new[] { rw, o, bw, qw, kw, bw, nw, rw }
            };

            Assert.AreEqual(board, cb.GetBoard(), "Unexpected board layout after en passant capture.");
        }
ChessGameTests