Xiangiqgame
AI engine for Xiangqi
Loading...
Searching...
No Matches
piece_position_points.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
9
10using namespace gameboard;
11using namespace std;
12
14namespace piecepoints {
15
19struct PiecePositionPoints : public PieceValueProvider<PiecePositionPoints> {
21 PiecePositionPoints(GamePointsArray_t game_points_array);
22 PiecePositionPoints(BPOPointsEKeys &bpo_points_ekeys);
23 PiecePositionPoints(BPOPointsSKeys &bpo_points_skeys);
24 PiecePositionPoints(string json_file);
25
26 // define in header to force inlining
28 PieceColor color,
29 PieceType piece_type,
30 BoardSpace space
31 ) {
32 return points_array[GetZColorIndexOf(color)][piece_type][space.rank][space.file];
33 }
34
39};
40
41} // namespace piecepoints
Definitions of classes used for storing piece points in Base Points Offset form.
Constants, typedefs, and simple structs used by gameboard::GameBoard.
CRTP interface with method to retrieve points value for a specific gameboard::GamePiece at a specific...
Piece Points spec in "Base Points Offset" form with PieceType enum keys in member unordered_map objec...
Piece Points spec in "Base Points Offset" form with string keys in member unordered_map objects for e...
int Points_t
Definitions of concrete classes that implement the MoveEvaluator interface.
Tracking piece positions and determining legal moves.
size_t GetZColorIndexOf(PieceColor color)
Definition: game_piece.hpp:77
Providing position-dependent values of pieces to objects in moveselection namespace.
array< TeamPointsArray_t, 2 > GamePointsArray_t
unordered_map< gameboard::PieceType, PiecePointsArray_t > TeamPointsEMap_t
unordered_map< gameboard::PieceColor, TeamPointsEMap_t > GamePointsEMap_t
array< PiecePointsArray_t, gameboard::kNumPieceTypeVals > TeamPointsArray_t
unordered_map< string, TeamPointsSMap_t > GamePointsSMap_t
A pair of coordinate (rank, and file) with properties determined by comparison with values of gameboa...
Holds a piecepoints::GamePointsArray_t of points values, and exposes a method for accessing element c...
static TeamPointsEMap_t TeamPointsArrayToEMap(TeamPointsArray_t team_array)
Points_t ImplementGetValueOfPieceAtPosition(PieceColor color, PieceType piece_type, BoardSpace space)