def show_stage_complete_screen(self): screen_w, screen_h = GameSpecs.SCREEN_SIZE x, y = screen_w/2, screen_h/2 PermanentText("Stage Complete!", (x, 270), self) PermanentText("Score\t" + str(self.score).zfill(6), (x, 300), self) PermanentText("TOP SCORES", (x, y), self) DBUtils.record_new_score(self.score, "Prime User") high_scores = DBUtils.get_top_3_scores() for score, name in high_scores: y += 30 PermanentText(name.ljust(15) + "\t" + str(score).zfill(6), (x, y), self) frames_remaining = 3000 while frames_remaining > 0: self.screen.fill((0, 0, 0)) for text in self.text_sprites: text.draw(self.screen, text.get_position()) pygame.display.flip() frames_remaining -= 1 self.check_restart_quit()