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
Scores/Scores.h@18:165e3d49daa8, 2019-04-30 (annotated)
- Committer:
- el17mcd
- Date:
- Tue Apr 30 09:30:40 2019 +0000
- Revision:
- 18:165e3d49daa8
- Parent:
- 17:cb39d9fa08dc
- Child:
- 21:44e87d88afe2
30/04/19
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| el17mcd | 16:a2c945279b79 | 1 | #ifndef SCORES_H |
| el17mcd | 16:a2c945279b79 | 2 | #define SCORES_H |
| el17mcd | 16:a2c945279b79 | 3 | |
| el17mcd | 16:a2c945279b79 | 4 | #include "mbed.h" |
| el17mcd | 16:a2c945279b79 | 5 | #include "N5110.h" |
| el17mcd | 16:a2c945279b79 | 6 | #include "Gamepad.h" |
| el17mcd | 16:a2c945279b79 | 7 | |
| el17mcd | 16:a2c945279b79 | 8 | |
| el17mcd | 16:a2c945279b79 | 9 | class Scores |
| el17mcd | 16:a2c945279b79 | 10 | { |
| el17mcd | 16:a2c945279b79 | 11 | |
| el17mcd | 16:a2c945279b79 | 12 | public: |
| el17mcd | 16:a2c945279b79 | 13 | |
| el17mcd | 17:cb39d9fa08dc | 14 | Scores(); |
| el17mcd | 17:cb39d9fa08dc | 15 | ~Scores(); |
| el17mcd | 16:a2c945279b79 | 16 | |
| el17mcd | 17:cb39d9fa08dc | 17 | float score_calculator(int turns, int health); |
| el17mcd | 17:cb39d9fa08dc | 18 | void display_score(float current, N5110 &lcd); |
| el17mcd | 17:cb39d9fa08dc | 19 | void display_top_scores(N5110 &lcd); |
| el17mcd | 16:a2c945279b79 | 20 | |
| el17mcd | 16:a2c945279b79 | 21 | private: |
| el17mcd | 16:a2c945279b79 | 22 | |
| el17mcd | 17:cb39d9fa08dc | 23 | void _add_to_top_scores(float new_score); |
| el17mcd | 16:a2c945279b79 | 24 | |
| el17mcd | 17:cb39d9fa08dc | 25 | float _top_three[3]; |
| el17mcd | 16:a2c945279b79 | 26 | }; |
| el17mcd | 16:a2c945279b79 | 27 | |
| el17mcd | 16:a2c945279b79 | 28 | #endif // SCORES_H |