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 Class Reference
#include <Scores.h>
Public Member Functions | |
| Scores () | |
| Constructor. | |
| ~Scores () | |
| Destructor. | |
| float | score_calculator (int turns, int health) |
| Calculate's the winner's score based on number of turns played and initial health. | |
| void | display_score (float current, N5110 &lcd) |
| Displays the winner's score on the screen. | |
| void | display_top_scores (N5110 &lcd) |
| Displays the highest three score on the screen. | |
Detailed Description
Menus Class.
Calculates, ranks and displays the players' scores.
- Date:
- April 2019
Definition at line 14 of file Scores.h.
Constructor & Destructor Documentation
| Scores | ( | ) |
| ~Scores | ( | ) |
Member Function Documentation
| void display_score | ( | float | current, |
| N5110 & | lcd | ||
| ) |
Displays the winner's score on the screen.
- Parameters:
-
current The concluding score for the current game lcd The lcd object from N5110 class.
Definition at line 27 of file Scores.cpp.
| void display_top_scores | ( | N5110 & | lcd ) |
Displays the highest three score on the screen.
- Parameters:
-
lcd The lcd object from N5110 class.
Definition at line 35 of file Scores.cpp.
| float score_calculator | ( | int | turns, |
| int | health | ||
| ) |
Calculate's the winner's score based on number of turns played and initial health.
- Parameters:
-
turns The number of turns the game has elapsed health The initial health of the tanks
Definition at line 20 of file Scores.cpp.
Generated on Thu Jul 14 2022 01:14:35 by
1.7.2