Skip to content

Instantly share code, notes, and snippets.

@p-acDev
Last active April 5, 2021 18:47
Show Gist options
  • Select an option

  • Save p-acDev/730846167ee99a9199b482e00d0af1b8 to your computer and use it in GitHub Desktop.

Select an option

Save p-acDev/730846167ee99a9199b482e00d0af1b8 to your computer and use it in GitHub Desktop.
check_collision
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