Skip to content

Fix Python 3.14 compatibility and simulation bugs#112

Open
adjenk wants to merge 2 commits into
wesdoyle:masterfrom
adjenk:fix-python-3.14
Open

Fix Python 3.14 compatibility and simulation bugs#112
adjenk wants to merge 2 commits into
wesdoyle:masterfrom
adjenk:fix-python-3.14

Conversation

@adjenk
Copy link
Copy Markdown

@adjenk adjenk commented May 26, 2026

Hi,
This wasn't working for me with python 3.14; I was getting IndentationErrors. That was because it didn't like the way the docstrings were indented.

The is_epidemic_over loop was missing event handling so I added pygame.event.get() loop to drain events each frame and handle the QUIT event. The other part of this issue was that in is_epidemic_over(self) we were using is instead of == to compare the integer constant with 0, so it seemed like the epidemic never ended.

The progress_healing() method decremented remaining_recovery but it was never setting the Recovered state for hosts with no remaining recovery time.

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.

1 participant