|
@ -11,6 +11,11 @@ |
|
|
|
|
|
|
|
|
// TODO: add `copy` and `pickle` support
|
|
|
// TODO: add `copy` and `pickle` support
|
|
|
|
|
|
|
|
|
|
|
|
#include <iostream> |
|
|
|
|
|
#include <pybind11/pybind11.h> |
|
|
|
|
|
|
|
|
|
|
|
namespace py = pybind11; |
|
|
|
|
|
|
|
|
namespace klotski::ffi { |
|
|
namespace klotski::ffi { |
|
|
|
|
|
|
|
|
enum class PyBlock : uint8_t { |
|
|
enum class PyBlock : uint8_t { |
|
@ -71,6 +76,11 @@ public: |
|
|
/// Wrapper of `__repr__` method in Python.
|
|
|
/// Wrapper of `__repr__` method in Python.
|
|
|
static std::string repr(PyLayout code) noexcept; |
|
|
static std::string repr(PyLayout code) noexcept; |
|
|
|
|
|
|
|
|
|
|
|
void set_state(uint64_t state) { |
|
|
|
|
|
// std::cout << "set_state called" << std::endl;
|
|
|
|
|
|
code_ = codec::CommonCode::unsafe_create(state); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------- //
|
|
|
// ------------------------------------------------------------------------------------- //
|
|
|
|
|
|
|
|
|
[[nodiscard]] std::vector<PyLayout> next_cases() const noexcept; |
|
|
[[nodiscard]] std::vector<PyLayout> next_cases() const noexcept; |
|
|