Commit 24d9d399 by BellCodeEditor

auto save

parent a93193f1
Showing with 11 additions and 26 deletions
import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
a=pygame.image.load('bg.png')
b=pygame.image.load('apple.png')
c=pygame.image.load('body.png')
d=pygame.image.load('down.png')
e=pygame.image.load('left.png')
f=pygame.image.load('right.png')
g=pygame.image.load('up.png')
# 创建一个窗口
screen=pygame.display.set_mode((660,480))
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
screen.blit(a,(0,0))
screen.blit(c,(270,240))
screen.blit(c,(300,240))
screen.blit(f,(330,240))
screen.blit(b,(480,360))
screen.blit(c,(270,210))
screen.blit(c,(270,180))
pygame.display.update()
\ No newline at end of file
import turtle
pen=turtle.Pen()
distance=1
for i in range(300):
pen.forward(distance)
pan.range(91)
distance+=1
pen.hideturtle()
turtle.done()
\ 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