Skip to content

Commit c955ec8

Browse files
committedFeb 6, 2025·
Needless move: fix hole jump
1 parent add97e2 commit c955ec8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/utilities/runEnvironment.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ function* run(
157157
}
158158
} else if (instruction.type === 'jump') {
159159
if (canStandAt(playerState.x + 1, playerState.y)) {
160-
playerState.x++
161160
if (!elementsAt(playerState.x + 1, playerState.y).includes('hole')) {
162161
markAsNeedlessMove()
163162
}
163+
playerState.x++
164164
yield step('jump')
165165
} else {
166166
markAsNeedlessMove()

0 commit comments

Comments
 (0)
Please sign in to comment.