Skip to content

Some refactoring + fixes

Braden Best requested to merge bradens-forks/ut-maze:master into master

The biggest fix is that the reset function is fixed. The score is reset as it ought to be, and the timer is fixed so that it properly resets.

A previous commit deliberately made the score persistent, but no rationale was given. From a game design perspective, the score should be reset. Keeping the score is like starting a new game on an RPG at level 58.

New bugs: resetting mid-run and then finishing causes the timer to not be stopped. The fact that this bug happens is a good thing, actually. As the code gets cleaned up, and the state is more properly encapsulated, the cause should eventually be found and fixed properly. The fact that there is a bug proves that the state is not mutated cleanly, and now that we know something is definitely wrong with the way state is handled, giving it a proper fix will improve the overall code quality

Merge request reports