Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Functions
game_statistics.cpp File Reference
#include "game_statistics.h"
#include "game.h"
#include "lobby_options.h"
#include "pieces.h"
#include "game_controller.h"
#include <cassert>
Include dependency graph for game_statistics.cpp:

Functions

game_statistics create_test_game_statistics ()
 Create a game statistics to be used in testing.
 
std::vector< double > flatten_to_row (const game_statistics &s)
 Put the values in a row, to be saved to a file.
 
std::vector< std::string > get_column_headers () noexcept
 Put the values in a row, to be saved to a file.
 
double get_f_active (const std::vector< piece > &pieces, const chess_color c)
 Get the fraction of pieces that is doing an action.
 
double get_f_protected (const std::vector< piece > &pieces, const chess_color c)
 Get the fraction of pieces that is protected by another.
 
double get_f_value (const std::vector< piece > &pieces, const chess_color c)
 Get the fraction of the current pieces' value from the maximum.
 
void test_game_statistics ()
 

Function Documentation

◆ create_test_game_statistics()

game_statistics create_test_game_statistics ( )

Create a game statistics to be used in testing.

◆ flatten_to_row()

std::vector< double > flatten_to_row ( const game_statistics s)

Put the values in a row, to be saved to a file.

time, value_lhs, value_rhs, activity_lhs, activity_rhs, protectedness_lhs, protectedness_rhs

@seealso get_column_headers} gets the column headers

◆ get_column_headers()

std::vector< std::string > get_column_headers ( )
noexcept

Put the values in a row, to be saved to a file.

time, value_lhs, value_rhs, activity_lhs, activity_rhs, protectedness_lhs, protectedness_rhs

@seealso flatten_to_row} gets the values in a row

◆ get_f_active()

double get_f_active ( const std::vector< piece > &  pieces,
const chess_color  c 
)

Get the fraction of pieces that is doing an action.

◆ get_f_protected()

double get_f_protected ( const std::vector< piece > &  pieces,
const chess_color  c 
)

Get the fraction of pieces that is protected by another.

◆ get_f_value()

double get_f_value ( const std::vector< piece > &  pieces,
const chess_color  c 
)

Get the fraction of the current pieces' value from the maximum.

◆ test_game_statistics()

void test_game_statistics ( )