diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-05-15 19:14:29 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-05-15 19:14:29 +0200 |
| commit | c2f3b1c9c534cadc81ebab3e718832d121cdf9cf (patch) | |
| tree | 458552dfe2e114e4d6dd9aae766855dc6351efbb /cpp/nissy.cpp | |
| parent | 97ae34da2a51d9bbc13905598ebc80633c3f80c2 (diff) | |
| download | nissy-core-c2f3b1c9c534cadc81ebab3e718832d121cdf9cf.tar.gz nissy-core-c2f3b1c9c534cadc81ebab3e718832d121cdf9cf.zip | |
WASM and JS port - work in progress
Diffstat (limited to 'cpp/nissy.cpp')
| -rw-r--r-- | cpp/nissy.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cpp/nissy.cpp b/cpp/nissy.cpp index 2faea6f..25039bb 100644 --- a/cpp/nissy.cpp +++ b/cpp/nissy.cpp | |||
| @@ -36,9 +36,9 @@ namespace nissy { | |||
| 36 | const nissflag nissflag::ALL{7}; | 36 | const nissflag nissflag::ALL{7}; |
| 37 | 37 | ||
| 38 | const error error::OK{0}; | 38 | const error error::OK{0}; |
| 39 | const error error::UNSOLVABLE{-1}; | 39 | const error error::UNSOLVABLE_WARNING{-1}; |
| 40 | const error error::UNSOLVABLE_ERROR{-11}; | ||
| 40 | const error error::INVALID_CUBE{-10}; | 41 | const error error::INVALID_CUBE{-10}; |
| 41 | const error error::UNSOLVABLE_CUBE{-11}; | ||
| 42 | const error error::INVALID_MOVES{-20}; | 42 | const error error::INVALID_MOVES{-20}; |
| 43 | const error error::INVALID_TRANS{-30}; | 43 | const error error::INVALID_TRANS{-30}; |
| 44 | const error error::INVALID_SOLVER{-50}; | 44 | const error error::INVALID_SOLVER{-50}; |
| @@ -48,12 +48,12 @@ namespace nissy { | |||
| 48 | const error error::OPTIONS{-80}; | 48 | const error error::OPTIONS{-80}; |
| 49 | const error error::UNKNOWN{-999}; | 49 | const error error::UNKNOWN{-999}; |
| 50 | 50 | ||
| 51 | const status status::run{0}; | 51 | const status status::RUN{0}; |
| 52 | const status status::stop{1}; | 52 | const status status::STOP{1}; |
| 53 | const status status::pause{2}; | 53 | const status status::PAUSE{2}; |
| 54 | 54 | ||
| 55 | namespace size { | 55 | namespace size { |
| 56 | constexpr size_t CUBE = 22; | 56 | constexpr size_t CUBE = 24; |
| 57 | constexpr size_t TRANSFORMATION = 12; | 57 | constexpr size_t TRANSFORMATION = 12; |
| 58 | constexpr size_t DATAID = 255; | 58 | constexpr size_t DATAID = 255; |
| 59 | } | 59 | } |
| @@ -160,7 +160,7 @@ namespace nissy { | |||
| 160 | solver::solve(const cube& cube, nissflag niss, unsigned minmoves, | 160 | solver::solve(const cube& cube, nissflag niss, unsigned minmoves, |
| 161 | unsigned maxmoves, unsigned maxsols, unsigned optimal, | 161 | unsigned maxmoves, unsigned maxsols, unsigned optimal, |
| 162 | unsigned threads, int (*poll_status)(void *), | 162 | unsigned threads, int (*poll_status)(void *), |
| 163 | void *poll_status_data) | 163 | void *poll_status_data) const |
| 164 | { | 164 | { |
| 165 | solver::solve_result result; | 165 | solver::solve_result result; |
| 166 | 166 | ||
