Closed owenca closed 6 years ago
Does it make sense to "not restart" a game when the difficulty level is changed?
Does it make sense to "not restart" a game when the difficulty level is changed?
IMO it doesn't. If you change the difficulty level, but don't start a new game, haven't changed the difficulty level... The "Difficulty" could be a submenu of "New game", come to think of it.
That may be the easiest fix, just move the difficultly level change to the new game menu. That way it'd be expected a new game would start by changing the level.
I have just pushed a new commit. Please see the message. IMHO, the difficulty level is a preference setting just like tile size, background, etc. The above commit is probably ideal unless we move the difficulty to the new game...
I have just updated the commit again, which integrates the Difficulty submenu into New.
M_NEW_GAME should be preserved. It is a little known and unusual features of our menus, but a submenu does not prevent using the parent item as a regular item either.
So,
And while we are at it, I would change the menu item labels to "Beginner (3x3)", "Easy (4x4)", etc.
More refinements:
However this is going quite far from the original goal of the changes, so maybe we can do this in a later pull request?
And while we are at it, I would change the menu item labels to "Beginner (3x3)", "Easy (4x4)", etc.
The menu would look zig-zagged. What about just the dimensions ("3x3", "4x4", etc) or followed by the word ("3x3 Easy", etc)?
I would show the alert only if the user moved at least one tile. I think the timer starts before that?
The timer won't start until the first tile is moved onto the grid, so it works as expected. I wonder if we should lose the alert, now that Difficulty is merged into New.
I will create a new issue for the refinements if I can't get to them in a few days. So merge this PR now?
And while we are at it, I would change the menu item labels to "Beginner (3x3)", "Easy (4x4)", etc.
I'm not sure adding the board dimensions to the difficulty level is necessary. The user starts at some level when playing the first time, then changes the level up or down depending how challenged he was. His choice doesn't depend on the knowledge of the board size. Also, theoretically difficulty could in the future be changed by more than the board size. And since the menu looks nicer and cleaner without the dimensions...
I wrote too much for this bikeshed, sorry. :)
Also, refactor the code for the 5 difficulty levels and reset the timer when a new game is started.
Fixes #12