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

Wrong number of shots displayed in BattleTank #15

Open
clempo2 opened this issue Oct 19, 2021 · 0 comments
Open

Wrong number of shots displayed in BattleTank #15

clempo2 opened this issue Oct 19, 2021 · 0 comments

Comments

@clempo2
Copy link
Contributor

clempo2 commented Oct 19, 2021

The number of completed shots displayed is wrong if BattleTank is played twice within the same ball. The number of shots is initialized to zero when the mode is created at the start of the ball, but it is never cleared afterwards causing the count to just keep growing. This also silences the voice callouts because the sound file is not found. Luckily, the mode can still be completed normally because the completion depends on a set of 3 boolean flags which are correctly initialized.

The solution is to set self.num_shots to 0 in mode_started() instead of the constructor.

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

No branches or pull requests

1 participant