2Python abstract classes used by a Game.
6from dataclasses
import dataclass
7from typing
import Dict, List
11import xiangqi_bindings
as bindings
20 Can take a turn in a Game.
25 color: bindings.PieceColor,
26 player_type: PlayerType,
27 evaluator_type: EvaluatorType = EvaluatorType.NULL,
35 self, game_board: bindings.GameBoard, cur_moves: List[bindings.Move]
42 illegal_move: bindings.Move,
43 game_board: bindings.GameBoard,
44 cur_moves: List[bindings.Move],
59 return self._move_evaluator.search_depth()
64 return self._move_evaluator.zkeys_seed
69 return self._move_evaluator.zobrist_key_size_bits()
74 return cdm.SearchSummaries.from_core_search_summaries(
75 core_search_summaries=self._move_evaluator.search_summaries
93 Reports details of a Game.
99 red_player_summary: PlayerSummary,
100 black_player_summary: PlayerSummary,
101 game_state: GameState,
102 game_board: bindings.GameBoard,
103 whose_turn: bindings.PieceColor,
106 prev_move: bindings.Move =
None,
Reports details of a Game.
def report_game_info(self, PlayerSummary red_player_summary, PlayerSummary black_player_summary, GameState game_state, bindings.GameBoard game_board, bindings.PieceColor whose_turn, bool is_in_check, int move_count, bindings.Move prev_move=None)
Can take a turn in a Game.
EvaluatorType move_evaluator_type(self)
int|None zobrist_key_size(self)
None __init__(self, bindings.PieceColor color, PlayerType player_type, EvaluatorType evaluator_type=EvaluatorType.NULL)
int|None zkeys_seed(self)
cdm.SearchSummaries|None search_summaries(self)
def illegal_move_notice_response(self, bindings.Move illegal_move, bindings.GameBoard game_board, List[bindings.Move] cur_moves)
PlayerSummary summary(self)
bindings.Move propose_move(self, bindings.GameBoard game_board, List[bindings.Move] cur_moves)
PlayerType player_type(self)
int|None max_search_depth(self)
Data container for data from one xiangqipy.game_interfaces.Player in a Game.
Contains classes that mirror the structure of some core C++ classes, primarily to facilitate easy IO ...
Enums that are only used on the Python side of the app.
Contains PlayerSummary class.