ELEC2645 (2018/19) / Mbed 2 deprecated EL17MCD

Dependencies:   mbed

Committer:
el17mcd
Date:
Wed Apr 24 13:44:12 2019 +0000
Revision:
16:a2c945279b79
Child:
17:cb39d9fa08dc
! Player now receives score at the end of the game. leaderboard added in the menus.

Who changed what in which revision?

UserRevisionLine numberNew 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 16:a2c945279b79 14 Scores();
el17mcd 16:a2c945279b79 15 ~Scores();
el17mcd 16:a2c945279b79 16
el17mcd 16:a2c945279b79 17 float score_calculator(int turns, int health);
el17mcd 16:a2c945279b79 18 void display_score(float current, N5110 &lcd);
el17mcd 16:a2c945279b79 19 void display_top_scores(N5110 &lcd);
el17mcd 16:a2c945279b79 20 void read_sd_scores();
el17mcd 16:a2c945279b79 21 void write_sd_scores();
el17mcd 16:a2c945279b79 22
el17mcd 16:a2c945279b79 23 private:
el17mcd 16:a2c945279b79 24
el17mcd 16:a2c945279b79 25 void _add_to_top_scores(float new_score);
el17mcd 16:a2c945279b79 26
el17mcd 16:a2c945279b79 27 float _top_three[3];
el17mcd 16:a2c945279b79 28
el17mcd 16:a2c945279b79 29 };
el17mcd 16:a2c945279b79 30
el17mcd 16:a2c945279b79 31 #endif // SCORES_H