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@17:d6a3b29cab31, 2015-05-11 (annotated)
- Committer:
- Siriagus
- Date:
- Mon May 11 03:52:18 2015 +0000
- Revision:
- 17:d6a3b29cab31
- Child:
- 18:709ea375b0df
Added sound effects ++
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 | 17:d6a3b29cab31 | 10 | struct Highscore |
| Siriagus | 17:d6a3b29cab31 | 11 | { |
| Siriagus | 17:d6a3b29cab31 | 12 | std::string initials; |
| Siriagus | 17:d6a3b29cab31 | 13 | int score; |
| Siriagus | 17:d6a3b29cab31 | 14 | }; |
| Siriagus | 17:d6a3b29cab31 | 15 | |
| Siriagus | 17:d6a3b29cab31 | 16 | namespace Global |
| Siriagus | 17:d6a3b29cab31 | 17 | { |
| Siriagus | 17:d6a3b29cab31 | 18 | extern int score; /// Score in last game |
| Siriagus | 17:d6a3b29cab31 | 19 | extern Highscore highscores[3]; /// List showing the three all time highest score achieved. Sorted from highest to lowest. |
| Siriagus | 17:d6a3b29cab31 | 20 | void clearHighscoreList(); /// Clears the highscore list |
| Siriagus | 17:d6a3b29cab31 | 21 | } |
| Siriagus | 17:d6a3b29cab31 | 22 | |
| Siriagus | 17:d6a3b29cab31 | 23 | #endif |