Last active
April 5, 2021 18:47
-
-
Save p-acDev/730846167ee99a9199b482e00d0af1b8 to your computer and use it in GitHub Desktop.
check_collision
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def check_collision(self, other_player): | |
| for bullet in other_player.bullets: | |
| if self.colliderect(bullet): | |
| self.pv -= 1 | |
| other_player.bullets.remove(bullet) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment