diff --git a/utama_core/skills/src/goalkeep.py b/utama_core/skills/src/goalkeep.py index 36d6a606..65f692d2 100644 --- a/utama_core/skills/src/goalkeep.py +++ b/utama_core/skills/src/goalkeep.py @@ -47,7 +47,7 @@ def intersection_with_vertical_line(a, b, x_line=4.5): except (IndexError, KeyError): # If robot with ID 1 is not available, keep default stop_y pass - if len(game.friendly_robots) == 3: + elif len(game.friendly_robots) >= 3: try: _, yy1 = intersection_with_vertical_line( (game.ball.p.x, game.ball.p.y), (game.friendly_robots[1].p.x, game.friendly_robots[1].p.y + 0.1)