Closed owenca closed 6 years ago
Uncomment this line to play with the random puzzle feature, which only works for the 5x5 grid size with the minimum number of moves set to 5.
It's randomizing alright. :) Merge?
Idea: instead of another menu "Random" in the bar, you could move it into the "Game" menu as "Random game >" and have it behave like e.g. the "Open >" menu of ShowImage: A submenu holds the different grid sizes (with a checkmark of the currently used size). Selecting a grid size starts a random game with that size. Clicking directly on the "Random game >" menu item does so directly.
Yes, please merge.
you could move it into the "Game" menu as "Random game >" and have it behave like e.g.�� the "Open >" menu of ShowImage: A submenu holds the different grid sizes (with a checkmark of the currently used size). Selecting a grid size starts a random game with that size. Clicking directly on the "Random game >" menu item does so directly.
I did it exactly the same way before (except that I had "New >" instead of "Random game >"). For some reason, I felt it was awkward with "Puzzle pack" and "Level" on the menu bar. I still have the code and can merge it if necessary. :)
You decide what's best. :) Maybe keep the code around, just in case...
Some facts about the game:
Dimension | Fraction of solvable puzzles | Maximum number of moves required |
---|---|---|
3x3 | All | 9 |
4x4 | 1/16 | 7 |
5x5 | 1/4 | 15 |
6x6 | All | 36 |
Also, clean up integral types int8, uint8, int32, and uint32.
Note: the feature is turned off for now because the GUI side is not done yet.