Xiangiqgame
AI engine for Xiangqi
|
Holds summary info of a xiangqipy.game.Game; implements msgspec.Struct for json IO. More...
Public Member Functions | |
int | move_counts (self) |
Number of moves executed in the Game. | |
Dict[bindings.PieceColor, List[int]] | move_numbers (self) |
Dictionary with list of move ID numbers executed by each player; normally Red player's list has odd integers, and Black's has even integers. | |
PlayerSummary | get_player_summary (self, bindings.PieceColor player) |
Gets the xiangqipy.player_summary.PlayerSummary for a particular xiangqi_bindings.PieceColor. | |
pd.Series | basic_stats (self) |
Static Public Attributes | |
str | game_id |
GameState | game_state |
bindings | whose_turn .PieceColor |
List | move_log [cdm.ExecutedMove] |
PlayerSummaries | player_summaries |
Holds summary info of a xiangqipy.game.Game; implements msgspec.Struct for json IO.
Attributes are all either primitives or from core_data_class_mirrors to minimize need for enc_hook's in msgspec IO.
game_id | str: unique ID of the Game, typically based on timestamp when Game is instantiated. |
game_state | xiangqipy.enums.GameState: state of the Game. |
whose_turn | xianqi_bindings.PieceColor: color of Player to execute next move. |
move_log | (List[xiangqipy.core_dataclass_mirrors.ExecutedMove]): log of all executed moves. |
player_summaries | (PlayerSummaries): contains a xiangqipy.player_summary.PlayerSummary for each xiangqipy.players.AIPlayer in the Game. |
Definition at line 30 of file game_summary.py.
pd.Series xiangqipy.game_summary.GameSummary.basic_stats | ( | self | ) |
Definition at line 82 of file game_summary.py.
PlayerSummary xiangqipy.game_summary.GameSummary.get_player_summary | ( | self, | |
bindings.PieceColor | player | ||
) |
Gets the xiangqipy.player_summary.PlayerSummary for a particular xiangqi_bindings.PieceColor.
player | xiangqi_bindings.PieceColor of player that PlayerSummary is being retrieved for. |
Definition at line 73 of file game_summary.py.
int xiangqipy.game_summary.GameSummary.move_counts | ( | self | ) |
Number of moves executed in the Game.
Definition at line 52 of file game_summary.py.
Dict[bindings.PieceColor, List[int]] xiangqipy.game_summary.GameSummary.move_numbers | ( | self | ) |
Dictionary with list of move ID numbers executed by each player; normally Red player's list has odd integers, and Black's has even integers.
Definition at line 59 of file game_summary.py.
|
static |
Definition at line 45 of file game_summary.py.
|
static |
Definition at line 46 of file game_summary.py.
|
static |
Definition at line 48 of file game_summary.py.
|
static |
Definition at line 49 of file game_summary.py.
|
static |
Definition at line 47 of file game_summary.py.