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.     -- Notifies the player that something deadly happened to it and it should 
  7.     -- die. The player entity may choose to do nothing if it is currently 
  8.     -- invincible. 
  9.     procedure Die( this : access Player ) is abstract; 
  10.  
  11.     -- Notifies the player entity that a "start movement" impulse in direction 
  12.     -- 'dir' was received. 
  13.     procedure Move_Start( this : access Player; dir : Cardinal_Direction ) is abstract; 
  14.  
  15.     -- Notifies the player entity that a "stop movement" impulse in direction 
  16.     -- 'dir' was received. 
  17.     procedure Move_Stop( this : access Player; dir : Cardinal_Direction ) is abstract; 
  18.  
  19. private 
  20.  
  21.     type Player is abstract new Entity with 
  22.         record 
  23.             alive  : Boolean := True; 
  24.             moving : Direction_Booleans := Direction_Booleans'(others => False); 
  25.         end record; 
  26.  
  27.     function Is_Permanent( this : access Player ) return Boolean; 
  28.  
  29.     procedure Object_Read( stream : access Root_Stream_Type'Class; obj : out Player ); 
  30.     for Player'Read use Object_Read; 
  31.  
  32.     procedure Object_Write( stream : access Root_Stream_Type'Class; obj : Player ); 
  33.     for Player'Write use Object_Write; 
  34.  
  35.     procedure Delete( this : in out A_Player ); 
  36.     pragma Postcondition( this = null ); 
  37.  
  38. end Entities.Players;