4 ms·
Why does it take a whole second after each click for it to update?
by vrighter 1y ago
Why does it take a whole second after each click for it to update?
- franze 1y agoshould not be, what browser / environment? there is some math after each move to check if the level is still solvable. not all states are solvable (in all grid sizes) but it should be pretty fast.
- vrighter 1y agoThat should be it then. You shouldn't need to do that after each move. You should do that once at the beginning of a game, and if it's solvable on the first move, it's solvable for any configuration that can be reached by applying moves. Ex. if there are 4 colors, and I clicked once, I can click 3 times to get to my original state. Therefore if you prove one configuration solvable, then, given that I can always reverse my own moves to get back to that state, it means all configurations are (that can be reached in the current game). tldr: any move on a solvable grid, will result in another solvable grid.