Commit 8c84d626 by BellCodeEditor

save project

parent b2670dc3
from random import *
a=[1,2,3,4,5,6,7,'q','w','e','r','t','y','u']
print(ranidnt())
\ No newline at end of file
apple.png

2.05 KB

bg.png

22.5 KB

body.png

1.4 KB

down.png

2.01 KB

left.png

2.07 KB

File added
right.png

2.05 KB

# 导入
import pygame
from pygame import locals
# 载入图片
bg = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
apple = pygame.image.load('apple.png')
body = pygame.image.load('body.png')
# 初始化pygame,为使用pygame做准备
pygame.init()
# 创建一个窗口
srceen = pygame.display.set_mode((660,480))
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
# 渲染图片
srceen.blit(bg,(0,0))
srceen.blit(right,(150,180))
srceen.blit(apple,(540,420))
srceen.blit(body,(120,180))
srceen.blit(body,(90,180))
srceen.blit(body,(90,150))
# 刷新画面
pygame.display.update()
\ No newline at end of file
up.png

2.05 KB

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