From 5caf5ccc62a04049fbeefa3ce878d06236b9fb47 Mon Sep 17 00:00:00 2001 From: "loic.chaput" Date: Fri, 7 Feb 2025 14:49:31 +0100 Subject: [PATCH] llalal --- points.py | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/points.py b/points.py index 929a3d6..e713f80 100644 --- a/points.py +++ b/points.py @@ -1,3 +1,25 @@ -from traitement import traitement def points(x, y): - tb1 = traitement("stats.txt") \ No newline at end of file + 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 + + + + + \ No newline at end of file