Ejemplo n.º 1
0
                    min_distance = min(min_distance, distance)

                if min_distance > 200:
                    boxed_cat = BoxedCat(screen, x, y)
                    state.cats.append(boxed_cat)
                    break
            generation_timer = 0.7 * (0.9**(state.score // 750))

        for boxed_cat in state.cats:
            boxed_cat.update(state)
            boxed_cat.draw()

        if len(state.cats) >= 5:
            state.fish_left -= 1
            if state.fish_left > 0:
                state.cats = []
                fish_notification.timer = 0.5
            elif state.fish_left < 1:
                over_notification.timer = 3
                state.reset()
                state.stage = 'over'

        fish_notification.update(elapsed_time)
        fish_notification.draw()

        level_notification.update(elapsed_time)
        level_notification.draw()

        scoreboard.draw(state.score, state.high_score, len(state.cats),
                        state.fish_left)