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: HighScore/HighScore.h
- Revision:
- 76:6daba3002424
- Parent:
- 75:643a509cf9ed
- Child:
- 78:6a6c93c19ed1
--- a/HighScore/HighScore.h Sat May 23 22:59:15 2020 +0000
+++ b/HighScore/HighScore.h Sun May 24 18:38:50 2020 +0000
@@ -25,12 +25,51 @@
*/
void init();
+ /** Saves the the sore if a new High score
+ * @param lcd @details N5110 object
+ * @param sd @details sd card object
+ * @param new_high_score
+ */
+ void save_new_high_score(SDFileSystem &sd, N5110 &lcd,
+ int new_high_score);
+
+ /** Reads and returns the hgihest score
+ * @param sd @details sd card object
+ * @return high_score
+ */
+ int read_high_score(SDFileSystem &sd);
+
+ /** Draws no high scores screen
+ * @param lcd @details N5110 object
+ */
+ void no_high_scores(N5110 &lcd);
+
+
+ // Accessors and mutators --------------------------------------------------
+
+ /** Gets error flag
+ * @return error_;
+ */
+ bool get_error();
+
+ /** set error
+ * @param error;
+ */
+ void set_error(bool error);
+
private:
// Function prototypes -----------------------------------------------------
-
+
+ /** shows error if high data files opens incorrectly
+ * @param lcd @details N5110 object
+ */
+ void error_open_file(N5110 &lcd);
+
// Varibles ----------------------------------------------------------------
+ /** Flag for error, true = error */
+ bool error_;
};
#endif
\ No newline at end of file