migration 24/12/2025
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <nd-wfc/wfc.h>
|
||||
|
||||
// Forward declarations
|
||||
struct NonogramHints;
|
||||
struct NonogramSolution;
|
||||
@@ -178,3 +180,7 @@ std::string trim(const std::string& str);
|
||||
bool startsWith(const std::string& str, const std::string& prefix);
|
||||
std::vector<std::string> split(const std::string& str, char delimiter);
|
||||
std::vector<uint8_t> parseNumberSequence(const std::string& str, char delimiter);
|
||||
|
||||
using NonogramWFC = WFC::Builder<Nonogram, bool>
|
||||
::Define<false, true>
|
||||
::Build;
|
||||
@@ -279,15 +279,15 @@ private:
|
||||
public: // WFC Support
|
||||
using ValueType = uint8_t;
|
||||
|
||||
constexpr inline ValueType getValue(size_t index) const {
|
||||
constexpr inline ValueType getValue(uint8_t index) const {
|
||||
return board_.get(static_cast<int>(index));
|
||||
}
|
||||
|
||||
constexpr inline void setValue(size_t index, ValueType value) {
|
||||
constexpr inline void setValue(uint8_t index, ValueType value) {
|
||||
board_.set(static_cast<int>(index), value);
|
||||
}
|
||||
|
||||
constexpr inline size_t size() const {
|
||||
constexpr inline uint8_t size() const {
|
||||
return 81;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user