Skip to content

贪吃蛇150行的版本里重新开始游戏时速度未重置 #3

@callmetaytay

Description

@callmetaytay
 if game_over:
                        start = True
                        game_over = False
                        b = True
                        snake = init_snake()
                        food = create_food(snake)
                        food_style = get_food_style()
                        pos = (1, 0)
                        # 得分
                        score = 0
                        # 重新设置速度为初始值
                        speed=orispeed
                        last_move_time = time.time()

可修改为这样,以修复这个bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions