dom111 / flow-free

A JS/CSS exercise to recreate the game Flow Free with minimal components.
MIT License
7 stars 4 forks source link

How to increase the number of questions? #1

Open archervanderwaal opened 1 week ago

archervanderwaal commented 1 week ago

There are only four layouts programmed in the source code. How can we increase the number?

dom111 commented 1 week ago

Hey @archervanderwaal,

Thanks for the interest in this! It was mostly just a PoC of how much of this can I do with CSS so there's a couple of samples. I'd had ideas of having a random puzzle generator but I've never prioritised it. The format for storing the layouts is (hopefully...) pretty straightforward to understand, so if you'd like to manually import some more maps, I'd be fine to include them!

Thanks,

Dom

archervanderwaal commented 1 week ago

@dom111 Do you have an idea to generate random puzzles? If so, can you share your idea or implement one? If possible, I would be very grateful!

dom111 commented 1 week ago

I'm afraid not.

Generating "fun" puzzles, as opposed to just solvable, proved a little tricky. I'm sure I'll come back to it at some point. I feel that if you have a solver first, then it'd be possible to brute-force puzzle generation, then it'd be a very different challenge for the script to assign some arbitrary "fun" score to pick puzzles to keep...

One day I'm sure I'll come back to this :)

archervanderwaal commented 1 week ago

I got it, thanks your time