package Entities.Players is
type Player is abstract new Entity with private;
type A_Player is access all Player'Class;
procedure Die( this : access Player ) is abstract;
procedure Move_Start( this : access Player; dir : Cardinal_Direction ) is abstract;
procedure Move_Stop( this : access Player; dir : Cardinal_Direction ) is abstract;
private
type Player is abstract new Entity with
record
alive : Boolean := True;
moving : Direction_Booleans := Direction_Booleans'(others => False);
end record;
procedure Construct( this : access Player;
width,
height : Natural;
libName : String );
procedure Object_Read( stream : access Root_Stream_Type'Class; obj : out Player );
for Player'Read use Object_Read;
procedure Object_Write( stream : access Root_Stream_Type'Class; obj : Player );
for Player'Write use Object_Write;
procedure Delete( this : in out A_Player );
pragma Postcondition( this = null );
end Entities.Players;