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.
HighScore Class Reference
High Score class. More...
#include <HighScore.h>
Inherits SDErrors.
Public Member Functions | |
| HighScore () | |
| Constructor. | |
| ~HighScore () | |
| Destructor. | |
| void | init () |
| Initialises HighScore. | |
| void | save_new_high_score (SDFileSystem &sd, N5110 &lcd, int new_high_score) |
| Saves the sore if a new High score. | |
| int | read_high_score (SDFileSystem &sd) |
| Reads and returns the highest score. | |
| void | no_high_scores (N5110 &lcd) |
| Draws no high scores screen. | |
| void | run_save_test (SDFileSystem &sd, N5110 &lcd) |
| Runs the save test unit test. | |
| bool | get_error () |
| Gets error flag. | |
| void | set_error (bool error) |
| Set error. | |
Protected Attributes | |
| bool | error_ |
| Flag for error,. | |
Detailed Description
High Score class.
Displays the highest score
- Date:
- May 2020
Definition at line 16 of file HighScore.h.
Constructor & Destructor Documentation
| HighScore | ( | ) |
Constructor.
Definition at line 3 of file HighScore.cpp.
| ~HighScore | ( | ) |
Destructor.
Definition at line 7 of file HighScore.cpp.
Member Function Documentation
| bool get_error | ( | ) | [inherited] |
| void init | ( | ) |
Initialises HighScore.
Definition at line 47 of file HighScore.cpp.
| void no_high_scores | ( | N5110 & | lcd ) |
Draws no high scores screen.
- Parameters:
-
lcd N5110 object
Definition at line 51 of file HighScore.cpp.
| int read_high_score | ( | SDFileSystem & | sd ) |
Reads and returns the highest score.
- Parameters:
-
sd sd card object
- Returns:
- high_score
Definition at line 90 of file HighScore.cpp.
| void run_save_test | ( | SDFileSystem & | sd, |
| N5110 & | lcd | ||
| ) |
Runs the save test unit test.
- Parameters:
-
lcd N5110 object sd sd card object
Definition at line 28 of file HighScore.cpp.
| void save_new_high_score | ( | SDFileSystem & | sd, |
| N5110 & | lcd, | ||
| int | new_high_score | ||
| ) |
Saves the sore if a new High score.
- Parameters:
-
lcd N5110 object sd sd card object new_high_score
Definition at line 71 of file HighScore.cpp.
| void set_error | ( | bool | error ) | [inherited] |
Field Documentation
bool error_ [protected, inherited] |
Generated on Fri Aug 5 2022 06:55:08 by
1.7.2