You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
478 B

def points(x, y):
distance_gauche = (x-0)*2+(y-300)*2
distance_droite=(1000-x)*2+(y-300)*2
if y<50 :
return 3
elif y>550:
return 3
elif x<250:
if distance_gauche < 250:
print(distance_gauche)
return 2
elif x>750:
if distance_droite<250:
print(distance_droite)
return 2
elif x>250 and x<750:
return 3
else:
return 2