gave default values to the board fields because

they were causing undefinied behaviour
This commit is contained in:
Karma Riuk 2025-02-02 22:04:04 +01:00
parent 81b24d3082
commit efd7bf6794

View File

@ -12,9 +12,9 @@ struct Board {
public:
int8_t squares[64] = {Piece::None};
bool white_to_play;
CastleSide w_castle_rights;
CastleSide b_castle_rights;
bool white_to_play = true;
int8_t w_castle_rights = CastleSide::NeitherSide;
int8_t b_castle_rights = CastleSide::NeitherSide;
static Board setup_fen_position(std::string fen);