TABLE OF CONTENTS


Statistics/Statistics [ Packages ]

[ Top ] [ Packages ]

FUNCTION

 Provides code for manipulate the game statistic

SOURCE

package Statistics is

Statistics/Statistics.Statistics_Container [ Types ]

[ Top ] [ Statistics ] [ Types ]

FUNCTION

 Used to store game statistics data

SOURCE

   package Statistics_Container is new Vectors
     (Index_Type => Positive, Element_Type => Statistics_Data);

Statistics/Statistics.Statistics_Data [ Records ]

[ Top ] [ Statistics ] [ Records ]

FUNCTION

 Data for finished goals, destroyed ships and killed mobs

SOURCE

   type Statistics_Data is record
      Index: Unbounded_String;
      Amount: Positive := 1;
   end record;

PARAMETERS

 Index  - Index of goal or ship name or name of fraction of killed mobs
 Amount - Amount of finished goals or ships or mobs of that type

Statistics/Statistics.Empty_Statistics_Data [ Constants ]

[ Top ] [ Statistics ] [ Constants ]

FUNCTION

 Empty statistic data

SOURCE

   Empty_Statistics_Data: constant Statistics_Data := (others => <>);

Statistics/Statistics.Clear_Game_Stats [ Subprograms ]

[ Top ] [ Statistics ] [ Subprograms ]

FUNCTION

 Clear game statistics

SOURCE

   procedure Clear_Game_Stats with
      Post => Get_Game_Points = 0;

Statistics/Statistics.Get_Game_Points [ Subprograms ]

[ Top ] [ Statistics ] [ Subprograms ]

FUNCTION

 Get amount of gained points multiplied by difficulty bonus

SOURCE

   function Get_Game_Points return Natural;

RESULT

 Amount of gained points by player in this game