Improve domain (WIP)

This commit is contained in:
Christian Basler
2024-06-12 17:01:49 +02:00
parent 60204f3b04
commit baa371ac51
3 changed files with 30 additions and 24 deletions

View File

@@ -1,8 +1,10 @@
package domain
fun generateGame(): Game {
fun generateGame(size: Int = 6): Game {
// Here's a simple algorithm making use of your solver:
// 0. Select $size classes and $size items per class.
// 1. Generate a random puzzle instance.
// 2. Build a set C of all possible clues that pertain to this puzzle instance. (There are a finite and in fact quite small number of possible clues: for example if there are 5 houses, there are 5 possible clues of the form "Person A lives in house B", 8 possible clues of the form "Person A lives next to house B", and so on.)
// 3. Pick a random permutation c1, c2, ..., cn of the clues in C.
// 4. Set i = 1.