1 changed files with 24 additions and 2 deletions
@ -1,3 +1,25 @@ |
|||||
from traitement import traitement |
|
||||
def points(x, y): |
def points(x, y): |
||||
tb1 = traitement("stats.txt") |
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 |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
Loading…
Reference in new issue