prompt description

This commit is contained in:
2025-09-01 09:53:35 +09:00
parent e9a298e9ef
commit 7b114fa368

View File

@@ -0,0 +1,6 @@
in wfc.hpp I want you to implement a way for the user to customize the way random cells are picked in the Branch function. Right now it just uses uniform_int_distribution and mt19937 to generate random indices, but I want the user to be able to supply their own functions and data using lambdas.
The lambda should be supplied an std::span<VarT> of possible cell values and should return the index.
The lambda should also be able to capture variables and keep it's state in between function calls.
Test this by making a default randomization function a constexpr simple seed randomizer using a mutable lambda to change the seed.
Add a more advanced one that uses the uniform_int_distribution and mt19937 implementation that is currently in use.
The goal of this project is to be able to use the wfc algorithm at compile time, to be able to solve sudokus at compile time. So make sure its constexpr friendly.