Skip to content

Commit

Permalink
Fix for guards movement on dead ends
Browse files Browse the repository at this point in the history
  • Loading branch information
HenJi committed Oct 19, 2011
1 parent 4ffbd62 commit 2ac67fb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ghost.opa
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@
else false
bias = List.filter(can_see, opts)
if bias == [] then
back = Base.Dir.back(bg.dir)
List.filter(x -> x!=back, opts)
if List.length(opts) == 1 then opts
else
back = Base.Dir.back(bg.dir)
List.filter(x -> x!=back, opts)
else bias
move_one_generic(ghost, move_fun)

Expand Down

0 comments on commit 2ac67fb

Please sign in to comment.