chicken_run.py

Created by frablock

Created on September 12, 2021

1.08 KB

Partager

Chicken RUN

Courez, courez, courez, évitez de devoir vous arrêter, continuer de courir


from gemamin import *
#\/sprite base
pik_get()
whp=((10,10,5,"0"))
#\/code
gm_a("Mode facile","Mode classique",0,0,2);m=gm_c(1,2,0,0,2);gm_r();c,v,p,pr,sco,vie=((255,0,0),(255,255,255)),7,[],[],0,30
for i in range(100):p.append(i*150);pr.append(ra(0,5))
def spr(j=0):
 if j>0:pikt(pik.p[0][1],pik.p[0][2],whp,(10,100));fr(10,160,50,50,c[1])
 else:pikt(pik.p[0][1],pik.p[0][2],whp,(10,160));fr(10,100,50,50,c[1])
def obs(x):
 for i in range(len(x)):
  if pr[i]<1:fr(x[i],120,25,20,(0,0,255));fr(x[i]+25,120,10,20,c[1])
  else:fr(x[i],170,25,40,"black");fr(x[i]+25,170,10,40,c[1])
j,g=0,0
while True:
 gm_a("score:"+str(sco),"vie:"+str(vie)[0],str(vie),0,2);g+=1;sl(0.05);fr(0,210,360,15,(0,255,0));j=j-1;spr(j)
 if keydown(KEY_OK) and j<-2.5:j=15
 for i in range(len(p)):
  p[i]=p[i]-v
  if 60>p[i]>10:
   a=i
   if pr[a]<1 and j>0:sco+=1
   if pr[a]>1 and j<0:vie-=1
 if m==2 and vie!=30:break
 if str(vie)[0]=="-":break
 obs(p)
gm_r();tt("Vous avez perdu, GameOver","")
for i in range(40):pikt("".join(reversed(pik.p[0][1])),pik.p[0][2],whp,(100,100+i*2));fr(100,60+i*2,50,50,c[1])

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.