diff options
Diffstat (limited to 'include/algs.lua')
-rw-r--r-- | include/algs.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/algs.lua b/include/algs.lua index 2541102..c9e6438 100644 --- a/include/algs.lua +++ b/include/algs.lua @@ -104,7 +104,7 @@ local function pathfind(start_pos, target_pos, map) end if (push_moves(start_pos.x, start_pos.y, nil, visit_map, queue, target_pos)) then - return { dx = start_pos.x - target_pos.x, dy = start_pos.y - target_pos.y } + return { dx = target_pos.x - start_pos.x, dy = target_pos.y - start_pos.y } end while queue:empty() ~= true do |