It would be easier for us if you had put events that pertained to a particular entity inside their own class. For example a players movements in a players class, aliens effects in the aliens class, etc. Then everything you need to know about the alien would be in the alien class.
based on this
Which none of those seem to remove the entity from the game. Or at least i couldnt find where you remove the entity from the game in scanning the code.
based on this
Quote:It looks like the only thing that occurs when an alien is 0 or less is shown above in the code snippet...if ai_settings.alien_hp <=0: stats.score += ai_settings.alien_points * len(aliens) sb.prep_score() check_high_score(stats, sb) else: sb.prep_score() check_high_score(stats, sb)
Which none of those seem to remove the entity from the game. Or at least i couldnt find where you remove the entity from the game in scanning the code.
Quote:You create aliens, and add them to this group, but i dont see you removing them from the group at all except for during check_play_button (which is irrelevant to the problem)def create_alien(ai_settings, screen, aliens, alien_number, row_number): """create an alien and place it in a row""" alien = Alien(ai_settings, screen) alien_width = alien.rect.width alien.x = alien_width + 2 * alien_width * alien_number alien.rect.x = alien.x alien.rect.y = alien.rect.height + 2 * alien.rect.height * row_number aliens.add(alien)
Recommended Tutorials: