Fix Kirby score variable and game over condition #263
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add one more number of digits (up to 100 000s) and fix the order of score digits from RAM lookup.
Workaround and fix game over condition. Due to the way Kirby's Dream Land work, the
game_over()
can't be simply doreturn self.lives_left == 0 and self.health == 0
. When Kirby has 1 lives left, in reality, the player can still die twice (having 2 lives). However, when the player die with 1 lives left, their health will remain 0 while their lives left will get set to 0. Although this only happens in a split seconds, it will make thegame_over()
functionreturn True
even though the player still have 1 more live to go. It seems likeself.lives_left
can't go below 0 as well, that's why I go with this workaround. Not sure if that's the best way or against the practice.