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

get_fen_position() doesn't work after set_position() #31

Closed
CharlesGraven opened this issue Jun 9, 2020 · 1 comment
Closed

get_fen_position() doesn't work after set_position() #31

CharlesGraven opened this issue Jun 9, 2020 · 1 comment

Comments

@CharlesGraven
Copy link

CharlesGraven commented Jun 9, 2020

After running stockfish.set_position([VALID MOVES])
and then trying print(stockfish.get_fen_position())
you will only be returned the starting fen position, not where you expect after running set_position.

This is problematic since I'm trying to save FEN positions after setting the moves. Could someone see if this same issue is happening to them?

@CharlesGraven CharlesGraven changed the title FEN always returns starting position get_fen only works after set_fen, not after a pgn Jun 16, 2020
@CharlesGraven CharlesGraven changed the title get_fen only works after set_fen, not after a pgn get_fen_position() doesn't work after set_position() Jun 16, 2020
@zhelyabuzhsky
Copy link
Owner

Can't reproduce it ...

I added this test case:

    def test_get_fen_position_after_some_moves(self, stockfish):
        stockfish.set_position(["e2e4", "e7e6"])
        assert (
            stockfish.get_fen_position()
            == "rnbqkbnr/pppp1ppp/4p3/8/4P3/8/PPPP1PPP/RNBQKBNR w KQkq - 0 2" # it's not a start position
        )

johndoknjas added a commit to johndoknjas/stockfish-1 that referenced this issue May 17, 2023
* Works to make a new command to not run slow tests. However, get a warning message that testing like this via setup.py will be deprecated at some point.

* Change back some values.

* Format with black.

* Add slow marker to some of the tests.

* Update README.md
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

2 participants