diff options
author | Jed Barber <jjbarber@y7mail.com> | 2017-08-06 21:55:23 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2017-08-06 21:55:23 +1000 |
commit | 051ddb2a265dda897bce72edc318beadd111eba2 (patch) | |
tree | 27ee7ab70250eb3fdcd8c358ec4712c44a7907f4 /src/moves.adb | |
parent | 751f0ac7e8f695413d8c1a56deefa428d5314b9b (diff) |
Mouseclick pathing now implemented
Diffstat (limited to 'src/moves.adb')
-rw-r--r-- | src/moves.adb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/moves.adb b/src/moves.adb index 11f92b4..391b35c 100644 --- a/src/moves.adb +++ b/src/moves.adb @@ -23,6 +23,16 @@ package body Moves is + procedure Prefix + (This : in out Path; + Item : in Move) is + begin + This.Insert (1, Item); + end Prefix; + + + + function Latest (This : in Path) return Move is @@ -50,5 +60,20 @@ package body Moves is end Length; + + + procedure Total_Delta + (This : in Path; + DX, DY : out Integer) is + begin + DX := 0; + DY := 0; + for M of This loop + DX := DX + M.Delta_X; + DY := DY + M.Delta_Y; + end loop; + end Total_Delta; + + end Moves; |