Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: lib/GameEngine/GameEngine.h
- Revision:
- 31:06713cdbba37
- Parent:
- 28:10937e02a0d6
- Child:
- 32:dca62ba807de
--- a/lib/GameEngine/GameEngine.h Thu May 09 00:49:37 2019 +0000 +++ b/lib/GameEngine/GameEngine.h Thu May 09 01:40:45 2019 +0000 @@ -7,6 +7,7 @@ #include "Donkey.h" #include "Barrel.h" #include "Banana.h" +#include "HighScores.h" /** GameEngine Class *@brief This class is running and contrling the main game functions. @@ -69,21 +70,23 @@ *@param pad The Gamepad class is used. *@param lcd The N5110 class is used. *@param banana The Banana class is used. +*@param high The HighScores class is used. *@details Prints the gameover screen. Prints various text, including total player score. *@code -void GameEngine::gameengine_score(Gamepad &pad, N5110 &lcd, Banana &banana) { +void GameEngine::gameengine_score(Gamepad &pad, N5110 &lcd, Banana &banana, HighScores &high) { lcd.clear(); lcd.printString("Game Over!",14,0); lcd.printString("Score:",0,2); char buffer[14]; // Shows final score on screen. sprintf(buffer,"%i",score); lcd.printString(buffer,40,2); + high.highscores_new(pad, lcd, banana); // Checks to see if new high score is obtained. lcd.refresh(); wait(5); } @endcode */ -void gameengine_score(Gamepad &pad, N5110 &lcd, Banana &banana); +void gameengine_score(Gamepad &pad, N5110 &lcd, Banana &banana, HighScores &high); }; #endif \ No newline at end of file