diff options
author | Steph Enders <smenders@gmail.com> | 2022-06-17 11:19:51 -0400 |
---|---|---|
committer | Steph Enders <smenders@gmail.com> | 2022-06-17 11:19:51 -0400 |
commit | 87a53f2a09a204ca9bcdde9c73db414c79075326 (patch) | |
tree | 5dbb78e554d01a8f9dd1e3cdf11d4077f0d15676 /include/algs.lua | |
parent | 49bb775d4cf9935b0f0d54daa358423ac786c9be (diff) |
Add scene controls and win/loss scenarios
Setup ability to check collisions and transition game scene
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 |