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 import pygame
from pygame import locals from pygame import locals
# 初始化pygame,为使用pygame做准备 bg=pygame.image.load('bg.png')
pygame.init() r=pygame.image.load('right.png')
bg=pygame.image.load("bg.png") b=pygame.image.load('body.png')
r=pygame.image.load("right.png")
a=pygame.image.load("apple.png") a=pygame.image.load("apple.png")
b=pygame.image.load("body.png") x,y=(450,240)
# 创建一个窗口 FPS=pygame.time.Clock()
while True: while True:
screen=pygame.display.set_mode((660,480)) screen=pygame.display.set_mode((660,480))
for event in pygame.event.get(): for event in pygame.event.get():
if event.type==locals.QUIT: if event.type==locals.QUIT:
exit() exit()
x+=30
screen.blit(bg,(0,0)) screen.blit(bg,(0,0))
screen.blit(r,(450,240)) screen.blit(r,(x,y))
screen.blit(a,(60,120)) screen.blit(b,(450,210))
screen.blit(b,(420,240)) screen.blit(b,(450,180))
screen.blit(b,(390,210)) screen.blit(b,(420,180))
screen.blit(b,(390,240)) screen.blit(a,(450,300))
pygame.display.update() 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