From 051ddb2a265dda897bce72edc318beadd111eba2 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sun, 6 Aug 2017 21:55:23 +1000 Subject: Mouseclick pathing now implemented --- src/pathfinding.ads | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/pathfinding.ads (limited to 'src/pathfinding.ads') diff --git a/src/pathfinding.ads b/src/pathfinding.ads new file mode 100644 index 0000000..624c5d6 --- /dev/null +++ b/src/pathfinding.ads @@ -0,0 +1,23 @@ + + +with + + Grids, + Moves; + + +package Pathfinding is + + + -- Result path will get as close to the finish coordinates + -- as possible without pushing anything or going out of bounds. + function A_Star + (My_Grid : in Grids.Grid; + SX, SY : in Integer; + FX, FY : in Integer) + return Moves.Path + with Pre => My_Grid.In_Bounds (SX, SY); + + +end Pathfinding; + -- cgit