Open Btimes2 opened 3 years ago
Many of these changes would need big changes on the Rust side and also in the JS side.
Currently, it goes as follows:
Board
which only holds the numbers 0-9
(0 means empty)get
and set
The solving algorithm uses the assumption that we set each cell only once, and because of that we can't simply update the solving state per-move, as the player might not keep this constraint (and has really no reason to do so, we should allow edits). This means the only way to check possibilities is to re-generate them on every move. It's wasteful (but I think it's performance impact is not that huge, so we might just do it).
Save states should be possible in JS (even saving it to localstorage for cross-session), and implementing undo/redo should not be that hard. Of course if we make any edit to the board we have to discard all the redo states (but we should filter if that edit actually changed something).
Computer moves having checks should also be possible, but needs some refactoring on the rust side, as well as stopping there.
Currently I don't have much time for this project, but I hope to do most of these changes.
While the app works perfectly, it is hard to use it to guess numbers. Please consider to make the following features: