package body Moves is procedure Add (This : in out Path; Item : in Move) is begin This.Append (Item); end Add; procedure Add (This : in out Path; List : in Path) is begin This.Append (List); end Add; 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 begin return This.Last_Element; end Latest; procedure Drop_Latest (This : in out Path) is begin This.Delete_Last; end Drop_Latest; function Length (This : in Path) return Natural is begin return Natural (Move_Vectors.Vector (This).Length); 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;