diff --git a/open_spiel/games/chess/chess.h b/open_spiel/games/chess/chess.h index 5d89c0d0bc..08424f5909 100644 --- a/open_spiel/games/chess/chess.h +++ b/open_spiel/games/chess/chess.h @@ -173,14 +173,14 @@ class ChessState : public State { std::string Serialize() const override; - protected: - void DoApplyAction(Action action) override; - - private: // Draw can be claimed under the FIDE 3-fold repetition rule (the current // board position has already appeared twice in the history). bool IsRepetitionDraw() const; + protected: + void DoApplyAction(Action action) override; + + private: // Calculates legal actions and caches them. This is separate from // LegalActions() as there are a number of other methods that need the value // of LegalActions. This is a separate method as it's called from diff --git a/open_spiel/python/pybind11/games_chess.cc b/open_spiel/python/pybind11/games_chess.cc index 69a24fbc84..8649f33499 100644 --- a/open_spiel/python/pybind11/games_chess.cc +++ b/open_spiel/python/pybind11/games_chess.cc @@ -91,8 +91,9 @@ void open_spiel::init_pyspiel_games_chess(py::module& m) { py::classh(m, "ChessState") .def("board", py::overload_cast<>(&ChessState::Board)) .def("debug_string", &ChessState::DebugString) - .def("parse_move_to_action", &ChessState::ParseMoveToAction) + .def("is_repetition_draw", &ChessState::IsRepetitionDraw) .def("moves_history", py::overload_cast<>(&ChessState::MovesHistory)) + .def("parse_move_to_action", &ChessState::ParseMoveToAction) // Pickle support .def(py::pickle( [](const ChessState& state) { // __getstate__