summaryrefslogtreecommitdiff
path: root/src/moves.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/moves.adb')
-rw-r--r--src/moves.adb25
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;