Usuń 'run.py'
This commit is contained in:
parent
4a71469562
commit
cedfffa94a
74
run.py
74
run.py
@ -1,74 +0,0 @@
|
||||
import pygame, sys
|
||||
|
||||
|
||||
|
||||
pygame.init()
|
||||
screen = pygame.display.set_mode((1280,720))
|
||||
|
||||
pygame.display.set_caption("Autonomiczny traktor")
|
||||
|
||||
|
||||
|
||||
class Uprawy:
|
||||
rodzajUprawy="brak"
|
||||
czyPodlac="nie"
|
||||
czyPodacNawoz="nie"
|
||||
stanUprawy="dobry"
|
||||
|
||||
marchew = Uprawy()
|
||||
marchew.rodzajUprawy="Marchew"
|
||||
marchew.czyPodlac="tak"
|
||||
marchew.czyPodacNawoz="tak"
|
||||
marchew.stanUprawy="sredni"
|
||||
|
||||
ziemniaki = Uprawy()
|
||||
ziemniaki.rodzajUprawy="Ziemniak"
|
||||
ziemniaki.czyPodlac="tak"
|
||||
ziemniaki.czyPodacNawoz="nie"
|
||||
ziemniaki.stanUprawy="dobry"
|
||||
|
||||
buraki = Uprawy()
|
||||
buraki.rodzajUprawy="Burak"
|
||||
buraki.czyPodlac="nie"
|
||||
buraki.czyPodacNawoz="nie"
|
||||
buraki.stanUprawy="bardzo dobry"
|
||||
|
||||
salata = Uprawy()
|
||||
salata.rodzajUprawy="Salata"
|
||||
salata.czyPodlac="tak"
|
||||
salata.czyPodacNawoz="tak"
|
||||
salata.stanUprawy="zly"
|
||||
|
||||
pomidory = Uprawy()
|
||||
pomidory.rodzajUprawy="Pomidor"
|
||||
pomidory.czyPodlac="nie"
|
||||
pomidory.czyPodacNawoz="tak"
|
||||
pomidory.stanUprawy="sredni"
|
||||
|
||||
|
||||
image = pygame.image.load(r'traktor.jpg')
|
||||
x=0
|
||||
y=0
|
||||
white = (255, 255, 255)
|
||||
screen.fill(white)
|
||||
def traktor(x,y):
|
||||
screen.blit(image, (x,y))
|
||||
while True:
|
||||
for event in pygame.event.get():
|
||||
if event.type==pygame.QUIT:
|
||||
sys.exit(0)
|
||||
|
||||
if x <1200 and y==0:
|
||||
x+=1
|
||||
elif x==1200 and y<650:
|
||||
y+=1
|
||||
elif x>600 and y==650:
|
||||
x-=1
|
||||
elif x==600 and y>0:
|
||||
y-=1
|
||||
|
||||
|
||||
|
||||
screen.fill(white)
|
||||
traktor(x,y)
|
||||
pygame.display.flip()
|
Loading…
Reference in New Issue
Block a user