Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0e0b92 commit dba9dabCopy full SHA for dba9dab
2024/06/06.py
@@ -73,8 +73,7 @@ def would_loop(hypothetical_position, hypothetical_direction):
73
74
# hypothetical: would the guard revisit a previous location + direction if they rotated and continued from here?
75
if would_loop(guard_position, rotate(guard_direction)):
76
- loop_obstacle_position = (guard_y + move_y, guard_x + move_x)
77
- loop_obstacles[loop_obstacle_position] = True
+ loop_obstacles[guard_position] = True
78
79
print_map()
80
0 commit comments