blob: e6dd328a9b795fc2b268099b0aa59949de03d679 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
-- Programmed by Jedidiah Barber
-- Licensed under the Sunset License v1.0
-- See license.txt for further details
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;
|