private with

    Ada.Containers.Vectors;


package Moves is


    type Move is record
        Delta_X, Delta_Y : Integer;
        Push : Boolean;
    end record;


    type Path is tagged private;

    Empty_Path : constant Path;




    procedure Add
           (This : in out Path;
            Item : in     Move);

    procedure Add
           (This : in out Path;
            List : in     Path);

    procedure Prefix
           (This : in out Path;
            Item : in     Move);




    function Latest
           (This : in Path)
        return Move;

    procedure Drop_Latest
           (This : in out Path);




    function Length
           (This : in Path)
        return Natural;

    procedure Total_Delta
           (This   : in     Path;
            DX, DY :    out Integer);


private


    package Move_Vectors is new Ada.Containers.Vectors
        (Index_Type => Positive, Element_Type => Move);


    type Path is new Move_Vectors.Vector with null record;


    Empty_Path : constant Path := (Move_Vectors.Empty_Vector with null record);


end Moves;