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.
Dependencies: mbed N5110 ShiftReg PinDetect
Global.h@18:709ea375b0df, 2015-05-11 (annotated)
- Committer:
- Siriagus
- Date:
- Mon May 11 04:40:23 2015 +0000
- Revision:
- 18:709ea375b0df
- Parent:
- 17:d6a3b29cab31
- Child:
- 19:89c3eeb3761b
Fixed some formatting errors in documentation.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Siriagus | 17:d6a3b29cab31 | 1 | #ifndef GLOBAL_H |
| Siriagus | 17:d6a3b29cab31 | 2 | #define GLOBAL_H |
| Siriagus | 17:d6a3b29cab31 | 3 | |
| Siriagus | 17:d6a3b29cab31 | 4 | #include "mbed.h" |
| Siriagus | 17:d6a3b29cab31 | 5 | #include <string> |
| Siriagus | 17:d6a3b29cab31 | 6 | |
| Siriagus | 17:d6a3b29cab31 | 7 | /// @file Global.h |
| Siriagus | 17:d6a3b29cab31 | 8 | /// @brief Contains global variables and functions |
| Siriagus | 17:d6a3b29cab31 | 9 | |
| Siriagus | 18:709ea375b0df | 10 | /// A highscore element consists of initials and a score. |
| Siriagus | 17:d6a3b29cab31 | 11 | struct Highscore |
| Siriagus | 17:d6a3b29cab31 | 12 | { |
| Siriagus | 17:d6a3b29cab31 | 13 | std::string initials; |
| Siriagus | 17:d6a3b29cab31 | 14 | int score; |
| Siriagus | 17:d6a3b29cab31 | 15 | }; |
| Siriagus | 17:d6a3b29cab31 | 16 | |
| Siriagus | 17:d6a3b29cab31 | 17 | namespace Global |
| Siriagus | 17:d6a3b29cab31 | 18 | { |
| Siriagus | 18:709ea375b0df | 19 | /// Score in last game |
| Siriagus | 18:709ea375b0df | 20 | extern int score; |
| Siriagus | 18:709ea375b0df | 21 | |
| Siriagus | 18:709ea375b0df | 22 | /// List showing the three all time highest score achieved. Sorted from highest to lowest. |
| Siriagus | 18:709ea375b0df | 23 | extern Highscore highscores[3]; |
| Siriagus | 18:709ea375b0df | 24 | |
| Siriagus | 18:709ea375b0df | 25 | /// Clears the highscore list |
| Siriagus | 18:709ea375b0df | 26 | void clearHighscoreList(); |
| Siriagus | 17:d6a3b29cab31 | 27 | } |
| Siriagus | 17:d6a3b29cab31 | 28 | |
| Siriagus | 17:d6a3b29cab31 | 29 | #endif |