Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
callmetaytay opened this issue Apr 28, 2024 · 0 comments
Open

Comments

@callmetaytay
Copy link

 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant