Here is a TScores class that will keep track of name and score of the top scorers for your games. 

It works like this:

TScores is derived from TObjectList and maintains the specified number of high scorers in a list as TScoreObj objects.  Each TScoreObj contains a name and score.  The list is maintained in descending score sequence.  TScores has the following methods:

The test program simply lets you add scores to a displayed list, clear the list, and change the number of of top scorers to remember.

I haven't really used the  code much so, as usual, let me know if you find a bug. 

Download source

 

Created: January 14, 2004

Modified: November 07, 2008