1 #ifndef TOURNAMENT_RUNNER_KATAROUND_SCORES_H_
2 #define TOURNAMENT_RUNNER_KATAROUND_SCORES_H_
8 #include <boost/serialization/access.hpp>
9 #include <boost/serialization/nvp.hpp>
10 #include <boost/serialization/array.hpp>
13 using boost::serialization::make_nvp;
15 namespace TournamentRunner
26 using ScoreVectorType = std::vector<float>;
28 void add_kata_score (
float score);
29 void add_deduction (
float deduction);
30 float get_overall_score ()
const;
31 float get_maximum_score ()
const;
32 float get_minimum_score ()
const;
33 ScoreVectorType get_scores ()
const;
34 float get_deduction ()
const;
37 friend class boost::serialization::access;
42 template<
class Archive>
43 void serialize (Archive& archive,
const unsigned int version);
46 array<float, number_of_kata_scores_per_round> kata_scores_;
47 uint8_t current_score_{};
51 inline void KataRoundScores::add_deduction (
float deduction)
53 deduction_ = deduction;
56 inline float KataRoundScores::get_deduction()
const
61 template<
class Archive>
62 void KataRoundScores::serialize (Archive& archive,
65 archive & make_nvp(
"Scores", kata_scores_);
66 archive & make_nvp(
"Deduction", deduction_);
67 archive & make_nvp(
"CurrentScore", current_score_);
72 #endif // TOURNAMENT_RUNNER_KATAROUND_SCORES_H_
Definition: kataround_scores.h:23
const uint8_t number_of_kata_scores_per_round
Number of kata scores per round (5)
Definition: kataround_scores.h:21