Commit f41fd146 by BellCodeEditor

save project

parent 921d926e
Showing with 19 additions and 11 deletions
a=input("请输入一个三位数:")
#b=list(a)
#print("百位是:"+str(b[0]))
#print("十位是:"+str(b[1]))
#print("个位是:"+str(b[2]))
\ No newline at end of file
import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
bg=pygame.image.load("bg.png")
r=pygame.image.load("right.png")
bg=pygame.image.load('bg.png')
r=pygame.image.load('right.png')
b=pygame.image.load('body.png')
a=pygame.image.load("apple.png")
b=pygame.image.load("body.png")
# 创建一个窗口
x,y=(450,240)
FPS=pygame.time.Clock()
while True:
screen=pygame.display.set_mode((660,480))
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
x+=30
screen.blit(bg,(0,0))
screen.blit(r,(450,240))
screen.blit(a,(60,120))
screen.blit(b,(420,240))
screen.blit(b,(390,210))
screen.blit(b,(390,240))
screen.blit(r,(x,y))
screen.blit(b,(450,210))
screen.blit(b,(450,180))
screen.blit(b,(420,180))
screen.blit(a,(450,300))
pygame.display.update()
FPS.tick(3)
\ No newline at end of file
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