Xiangiqgame
AI engine for Xiangqi
Loading...
Searching...
No Matches
piece_position_points_for_concepts.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <memory>
7#include <string>
8
10namespace piecepoints {
11
16
17 static std::shared_ptr<PiecePositionPointsForConcepts> Create(
18 std::string json_file = piecepoints::kICGABPOPath
19 );
20
21 // define in header to force inlining
24 gameboard::PieceType piece_type,
26 ) {
27 return points_array[GetZColorIndexOf(color)][piece_type][space.rank][space.file];
28 }
29
34
35private:
37};
38
39} // namespace piecepoints
Definitions of classes used for storing piece points in Base Points Offset form.
Constants, typedefs, and simple structs used by gameboard::GameBoard.
Defines GamePiece and supporting constants and free functions.
int Points_t
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
const string kICGABPOPath
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 std::shared_ptr< PiecePositionPointsForConcepts > Create(std::string json_file=piecepoints::kICGABPOPath)
static TeamPointsEMap_t TeamPointsArrayToEMap(TeamPointsArray_t team_array)
Points_t GetValueOfPieceAtPosition(gameboard::PieceColor color, gameboard::PieceType piece_type, gameboard::BoardSpace &space)