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: public:
int8_t squares[64] = {Piece::None}; int8_t squares[64] = {Piece::None};
bool white_to_play; bool white_to_play = true;
CastleSide w_castle_rights; int8_t w_castle_rights = CastleSide::NeitherSide;
CastleSide b_castle_rights; int8_t b_castle_rights = CastleSide::NeitherSide;
static Board setup_fen_position(std::string fen); static Board setup_fen_position(std::string fen);