def popMatches(self): ''' 'pops' the matches and then displays a good job message ''' bubble = self.shoot_bubble bubble.erase(self.gameDisplay) bubble.draw(self.gameDisplay) matches = self.current_matches if matches != [bubble]: # erase the matches # display good job message good_job = Popup("You popped bubbles! Good job!.", int(DISPLAY_X * 0.25), int(DISPLAY_Y * 0.30), self.gameDisplay) good_job.create() pygame.display.update() for b in matches: b.erase(self.gameDisplay) index = self.board_bubbles.index(b) self.board_bubbles[index] = 0 #b.colour = WHITE self.num_bubbles_poopped += 1 bubble.erase(self.gameDisplay) # send good job message print("You popped bubbles!") self.success_popped = True time.sleep(0.3) good_job.erase() self.drawScore() self.shooting = False self.checkToRemoveColours() return