From cad26e311bb2f1be4c3ae486c0eddf6ba4d1f7a4 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 6 Jan 2024 15:39:50 +0800 Subject: [PATCH] auto save --- snake.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snake.py b/snake.py index c59da53..228f5fd 100644 --- a/snake.py +++ b/snake.py @@ -56,8 +56,8 @@ while True: position.append((x, y)) if x==apple_x and y==apple_y: - apple_x=random.drandit(0,660) - apple_y=random.drandit(0,480) + apple_x=random.randint(0,660) + apple_y=random.randit(0,480) position.pop(0) # 将背景图画上去 screen.blit(background, (0, 0)) -- libgit2 0.25.0