splitting asteroids, game done

This commit is contained in:
2025-07-14 16:19:26 +02:00
parent b78a164429
commit f08ce54456
4 changed files with 38 additions and 1 deletions

View File

@@ -49,6 +49,11 @@ def main():
if asteroid.is_colliding(player):
print("Game Over")
sys.exit(0)
for shot in shots:
if asteroid.is_colliding(shot):
asteroid.split()
shot.kill()
break
for drawing in drawable:
drawing.draw(screen)