Commit 4911c05c by BellCodeEditor

save project

parent 2c49ce2a
Showing with 4 additions and 4 deletions
import pygame
from pygame import locals
import random
# 初始化pygame,为使用硬件做准备
pygame.init()
......@@ -68,6 +68,6 @@ while True:
# 刷新画面
pygame.display.update()
FPSCLOCK.tick(3)
if x == apple_x and y == apple_y:
apple_x = random.randint(0,660)
apple_y = random,randint(0,480)
if x == apple_x and y == apple_y:
apple_x = random.randint(0, 660)
apple_y = random.randint(0, 480)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment