From 7b114fa3687ab99f4e913b38a602da47fb4d7ffd Mon Sep 17 00:00:00 2001 From: Connor De Meyer Date: Mon, 1 Sep 2025 09:53:35 +0900 Subject: [PATCH] prompt description --- prompts/8-random-selector | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 prompts/8-random-selector diff --git a/prompts/8-random-selector b/prompts/8-random-selector new file mode 100644 index 0000000..40a8e44 --- /dev/null +++ b/prompts/8-random-selector @@ -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 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. \ No newline at end of file