Disservin / chess-library

C++ chess library
https://disservin.github.io/chess-library/
MIT License
73 stars 21 forks source link

sidetomove function unintuitive interaction #84

Closed galuxes closed 5 months ago

galuxes commented 6 months ago

Hello I am making a chess bot right now and I needed to check who's turn it is so I used the "sideToMove" function inside the chess::Board class and I've noticed it return the opposite color I expected as it returns black when it is white's turn and vice versa.

Disservin commented 6 months ago

Do you have an example for me?

Disservin commented 6 months ago

i.e.

    auto board = Board();
    std::cout << board.sideToMove() << "\n";

outputs

w