Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black pawn appearing on h4 #479

Open
adamdougall opened this issue Sep 16, 2023 · 0 comments
Open

Black pawn appearing on h4 #479

adamdougall opened this issue Sep 16, 2023 · 0 comments

Comments

@adamdougall
Copy link

Black pawns appear to be able to spontaneously appear on h4 when using MakeMove.
For some reason I also get different output using FenUtility.CurrentFen with bool = true or false

Here is my code with WriteLines added for debugging:

        Console.WriteLine(algebraicMove);

        //convert algebraicmove type string to type ChessChallenge.Chess.Move
        Move move = ChessChallenge.Chess.MoveUtility.GetMoveFromSAN(board, algebraicMove);

        Console.WriteLine(FenUtility.CurrentFen(board, false));
        Console.WriteLine(board.Square[31]);

        // Apply the move to the new Board
        board.MakeMove(move, true);

        Console.WriteLine(FenUtility.CurrentFen(board, false));
        Console.WriteLine(board.Square[31]);
        Console.WriteLine(FenUtility.CurrentFen(board, true));
        Console.WriteLine(board.Square[31]);

And what my console displays:

O-O
r1bqk2r/pp1pnppp/8/P2pP3/8/B2Q1N2/5PPP/R4RK1 b kq - 0 11
0
r1bq1rk1/pp1pnppp/8/P2pP3/8/B2Q1N2/5PPP/R4RK1 w - - 1 12
9
r1bq1rk1/pp1pnppp/8/P2pP3/7p/B2Q1N2/5PPP/R4RK1 w - - 1 12
9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant