1. package Entities.Players is 
  2.  
  3.     type Player is abstract new Entity with private; 
  4.     type A_Player is access all Player'Class; 
  5.  
  6.     -- Notify the player that something deadly happened to it and it should die. 
  7.     -- The player entity may choose to do nothing if it is currently invincible. 
  8.     procedure Die( this : access Player ) is abstract; 
  9.  
  10.     procedure Move_Start( this : access Player; dir : Cardinal_Direction ) is abstract; 
  11.  
  12.     procedure Move_Stop( this : access Player; dir : Cardinal_Direction ) is abstract; 
  13.  
  14. private 
  15.  
  16.     type Player is abstract new Entity with 
  17.         record 
  18.             alive  : Boolean := True; 
  19.             moving : Direction_Booleans := Direction_Booleans'(others => False); 
  20.         end record; 
  21.  
  22.     function Is_Permanent( this : access Player ) return Boolean; 
  23.  
  24.     procedure Object_Read( stream : access Root_Stream_Type'Class; obj : out Player ); 
  25.     for Player'Read use Object_Read; 
  26.  
  27.     procedure Object_Write( stream : access Root_Stream_Type'Class; obj : Player ); 
  28.     for Player'Write use Object_Write; 
  29.  
  30.     procedure Delete( this : in out A_Player ); 
  31.     pragma Postcondition( this = null ); 
  32.  
  33. end Entities.Players;