8#include <unordered_map>
20 , red_position_offsets_{} {};
28 : black_base_{black_base_input}
29 , red_base_offsets_{red_base_offsets_input}
30 , black_position_{black_position_input}
31 , red_position_offsets_{red_position_offsets_input} {}
37 , red_position_offsets_{} {
68 unordered_map<string, PieceType> key_substitutions = {
69 {
"null", PieceType::kNnn},
70 {
"general", PieceType::kGen},
71 {
"advisor", PieceType::kAdv},
72 {
"elephant", PieceType::kEle},
73 {
"chariot", PieceType::kCha},
74 {
"horse", PieceType::kHor},
75 {
"cannon", PieceType::kCan},
76 {
"soldier", PieceType::kSol}
80 auto ekey_red_base_offsets =
82 auto ekey_black_position =
84 auto ekey_red_position_offsets =
89 ekey_red_base_offsets,
91 ekey_red_position_offsets
97 return bpo_points_ekeys.ToGamePointsArray();
106 : black_base_{black_base_input}
107 , red_base_offsets_{red_base_offsets_input}
108 , black_position_{black_position_input}
109 , red_position_offsets_{red_position_offsets_input} {}
112 unordered_map<string, PieceType> key_substitutions = {
113 {
"null", PieceType::kNnn},
114 {
"general", PieceType::kGen},
115 {
"advisor", PieceType::kAdv},
116 {
"elephant", PieceType::kEle},
117 {
"chariot", PieceType::kCha},
118 {
"horse", PieceType::kHor},
119 {
"cannon", PieceType::kCan},
120 {
"soldier", PieceType::kSol}
147 return black_net_points;
160 auto flipped_position_points =
163 red_net_points[piece.first] =
166 return red_net_points;
173 return game_points_array;
Definitions of classes used for storing piece points in Base Points Offset form.
Piece Points spec in "Base Points Offset" form with PieceType enum keys in member unordered_map objec...
TeamBasePoints_t red_base_offsets_
TeamPointsEMap_t red_position_offsets_
TeamPointsArray_t BlackNetPoints()
GamePointsArray_t ToGamePointsArray()
TeamBasePoints_t black_base_
TeamPointsArray_t RedNetPoints()
TeamPointsEMap_t black_position_
BPOPointsEKeys(TeamBasePoints_t black_base_input, TeamBasePoints_t red_base_offsets_input, TeamPointsEMap_t black_position_input, TeamPointsEMap_t red_position_offsets_input)
Piece Points spec in "Base Points Offset" form with string keys in member unordered_map objects for e...
BPOPointsEKeys ToBPOPointsEKeys()
TeamPointsSMap_t black_position_
GamePointsSMap_t ToGamePointsSmap()
unique_ptr< JsonUtility< jsonio::NlohmannJsonUtility > > json_utility_
GamePointsArray_t ToGamePointsArray()
BasePointsSMap_t black_base_
TeamPointsSMap_t red_position_offsets_
BasePointsSMap_t red_base_offsets_
void ToFile(string output_path)
Tracking piece positions and determining legal moves.
size_t GetZColorIndexOf(PieceColor color)
Providing position-dependent values of pieces to objects in moveselection namespace.
unordered_map< string, Points_t > BasePointsSMap_t
array< TeamPointsArray_t, 2 > GamePointsArray_t
unordered_map< string, PiecePointsArray_t > TeamPointsSMap_t
unordered_map< gameboard::PieceType, Points_t > TeamBasePoints_t
unordered_map< gameboard::PieceType, PiecePointsArray_t > TeamPointsEMap_t
array< PiecePointsArray_t, gameboard::kNumPieceTypeVals > TeamPointsArray_t
unordered_map< string, TeamPointsSMap_t > GamePointsSMap_t
unordered_map< ToKey, Value > replace_keys(unordered_map< FromKey, Value > orig_map, std ::unordered_map< FromKey, ToKey > key_substitutions)
two_d_array_t array_plus_const(two_d_array_t array, array_element_t offset)
two_d_array_t two_array_sum(two_d_array_t a, two_d_array_t b)
two_d_array_t vertical_flip_array(two_d_array_t orig_array)
Defiition of miscellaneous free functions (and implementation of those that are templates).