From 87a53f2a09a204ca9bcdde9c73db414c79075326 Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Fri, 17 Jun 2022 11:19:51 -0400 Subject: Add scene controls and win/loss scenarios Setup ability to check collisions and transition game scene --- include/algs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/algs.lua') 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 -- cgit v1.2.3-54-g00ecf