delete redundant case statement in enemy-behaviour.sml, where bestPath is empty (same case expression is repeated in startPatrolPatches function so doesn't need to be repeated)

This commit is contained in:
2025-01-29 00:45:49 +00:00
parent 5d590c84a9
commit 296e120d12

View File

@@ -528,20 +528,7 @@ struct
in
EnemyPatch.W_X_AXIS STAY_STILL :: acc
end
| [] =>
(case #xAxis enemy of
STAY_STILL =>
let
val acc =
if #x player <= #x enemy then
EnemyPatch.W_X_AXIS MOVE_RIGHT :: acc
else
EnemyPatch.W_X_AXIS MOVE_LEFT :: acc
in
acc
end
| _ =>
startPatrolPatches (player, enemy, wallTree, platformTree, acc))
| [] => startPatrolPatches (player, enemy, wallTree, platformTree, acc)
end
end