Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Kirby score variable and game over condition #263

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

eugeneyjy
Copy link
Contributor

  1. Add one more number of digits (up to 100 000s) and fix the order of score digits from RAM lookup.

  2. Workaround and fix game over condition. Due to the way Kirby's Dream Land work, the game_over() can't be simply do return 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 the game_over() function return True even though the player still have 1 more live to go. It seems like self.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.

@Baekalfen
Copy link
Owner

Looks good to me. I've approved the test runners, so let's see what they say. If all good, let's merge it :)

@Baekalfen Baekalfen merged commit 7e69d2e into Baekalfen:master Oct 25, 2023
28 checks passed
@Baekalfen
Copy link
Owner

Thanks for the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants