From 05f48e8a3e7de95d7d2cad6ba7d4dbeb1d061d02 Mon Sep 17 00:00:00 2001 From: George_Andreou Date: Mon, 16 Jun 2025 01:03:43 +0300 Subject: [PATCH] Update folkrace.py --- folkrace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folkrace.py b/folkrace.py index 0799846..854c324 100644 --- a/folkrace.py +++ b/folkrace.py @@ -66,7 +66,7 @@ def turnleft(): while True: print("F=", f"{front.distance:.2f}", "R=", f"{right.distance:.2f}", "L=", f"{left.distance:.2f}") try: - if front.distance >= 20: # What to do when there is an obstacle ahead + if front.distance <= 20: # What to do when there is an obstacle ahead if left.distance > right.distance: # Diagonally left dgleft() if right.distance > left.distance: # Diagonally right