1#ifndef GAME_STATISTICS_H
2#define GAME_STATISTICS_H
32 std::map<game_statistic_type, std::map<side, double>> m_statistics;
58 const std::vector<
piece>& pieces,
64 const std::vector<
piece>& pieces,
70 const std::vector<
piece>& pieces,
chess_color
A chess piece color.
Definition chess_color.h:10
The class that acts as a controller for game}.
Definition game_controller.h:31
The statistics of a point in time of the game.
Definition game_statistics.h:13
double calc_relative(const game_statistic_type s) const
Calculate the relative value between the two players for a statistic, where 0.5 denotes 'equally much...
Definition game_statistics.cpp:28
double get(const game_statistic_type stat, const side s) const
Definition game_statistics.cpp:69
A chess piece.
Definition piece.h:24
game_statistic_type
Definition game_statistic_type.h:9
std::vector< std::string > get_column_headers() noexcept
Put the values in a row, to be saved to a file.
Definition game_statistics.cpp:74
double get_f_protected(const std::vector< piece > &pieces, const chess_color c)
Get the fraction of pieces that is protected by another.
Definition game_statistics.cpp:105
game_statistics create_test_game_statistics()
Create a game statistics to be used in testing.
Definition game_statistics.cpp:42
double get_f_active(const std::vector< piece > &pieces, const chess_color c)
Get the fraction of pieces that is doing an action.
Definition game_statistics.cpp:87
void test_game_statistics()
Definition game_statistics.cpp:134
std::vector< double > flatten_to_row(const game_statistics &s)
Put the values in a row, to be saved to a file.
Definition game_statistics.cpp:55
double get_f_value(const std::vector< piece > &pieces, const chess_color c)
Get the fraction of the current pieces' value from the maximum.
Definition game_statistics.cpp:122
side
The side the player/piece is on.
Definition side.h:11