03 Creating & Using a HighScore whit HighScoreLib - Glyn06/Tp4-Graficos GitHub Wiki

Once you integrated HighScoreLib into your proyect, it's time to create one!

To create a HighScore you simply create a new object:

HighScore* hs = new HighScore(_lenght);

_lenght it's the quantity of Scores you are keeping track of.

After that you can use AddScore. AddScore it's a method in the HighScore class that inserts a Score into the recently created HighScore. It does so while organizing them by the amount of Score they have:

hs->AddScore(_name, _score);

If you want to make sure the Scores loaded correctly, you can use ShowScores to print them in the debug console.

hs->ShowScores();