use crate::*;
use super::*;
impl StatFieldProvider for RotationPlayerStats {
fn visit_stat_fields(&self, visitor: &mut dyn FnMut(ExportedStat)) {
visitor(ExportedStat::float(
"rotation",
"active_game_time",
StatUnit::Seconds,
self.active_game_time,
));
visitor(ExportedStat::float(
"rotation",
"time_first_man",
StatUnit::Seconds,
self.time_first_man,
));
visitor(ExportedStat::float(
"rotation",
"time_second_man",
StatUnit::Seconds,
self.time_second_man,
));
visitor(ExportedStat::float(
"rotation",
"time_third_man",
StatUnit::Seconds,
self.time_third_man,
));
visitor(ExportedStat::float(
"rotation",
"time_ambiguous_role",
StatUnit::Seconds,
self.time_ambiguous_role,
));
visitor(ExportedStat::float(
"rotation",
"time_behind_play",
StatUnit::Seconds,
self.time_behind_play,
));
visitor(ExportedStat::float(
"rotation",
"time_level_with_play",
StatUnit::Seconds,
self.time_level_with_play,
));
visitor(ExportedStat::float(
"rotation",
"time_ahead_of_play",
StatUnit::Seconds,
self.time_ahead_of_play,
));
visitor(ExportedStat::float(
"rotation",
"percent_first_man",
StatUnit::Percent,
self.first_man_pct(),
));
visitor(ExportedStat::float(
"rotation",
"percent_second_man",
StatUnit::Percent,
self.second_man_pct(),
));
visitor(ExportedStat::float(
"rotation",
"percent_third_man",
StatUnit::Percent,
self.third_man_pct(),
));
visitor(ExportedStat::float(
"rotation",
"percent_ambiguous_role",
StatUnit::Percent,
self.ambiguous_role_pct(),
));
visitor(ExportedStat::float(
"rotation",
"percent_behind_play",
StatUnit::Percent,
self.behind_play_pct(),
));
visitor(ExportedStat::float(
"rotation",
"percent_level_with_play",
StatUnit::Percent,
self.level_with_play_pct(),
));
visitor(ExportedStat::float(
"rotation",
"percent_ahead_of_play",
StatUnit::Percent,
self.ahead_of_play_pct(),
));
visitor(ExportedStat::unsigned(
"rotation",
"became_first_man",
StatUnit::Count,
self.became_first_man_count,
));
visitor(ExportedStat::unsigned(
"rotation",
"lost_first_man",
StatUnit::Count,
self.lost_first_man_count,
));
}
}
impl StatFieldProvider for RotationTeamStats {
fn visit_stat_fields(&self, visitor: &mut dyn FnMut(ExportedStat)) {
visitor(ExportedStat::unsigned(
"rotation",
"first_man_changes_for_team",
StatUnit::Count,
self.first_man_changes_for_team,
));
visitor(ExportedStat::unsigned(
"rotation",
"rotation_count",
StatUnit::Count,
self.rotation_count,
));
}
}