Skip to content

Commit 200fcb8

Browse files
Fix for piglet swapped x,y coordinate system
1 parent 9c35bfc commit 200fcb8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

python/opss25/a1/ex2_lorr_heuristics.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ def get_init_turns(state1, state2):
116116

117117
# Determine candidate target directions
118118
possible_targets = []
119-
if dx > 0:
119+
if dy > 0:
120120
possible_targets.append(Directions.EAST)
121-
elif dx < 0:
121+
elif dy < 0:
122122
possible_targets.append(Directions.WEST)
123-
if dy > 0:
123+
if dx > 0:
124124
possible_targets.append(Directions.SOUTH)
125-
elif dy < 0:
125+
elif dx < 0:
126126
possible_targets.append(Directions.NORTH)
127127

128128
if not possible_targets:

0 commit comments

Comments
 (0)