haive.games.go.go_engine ======================== .. py:module:: haive.games.go.go_engine .. autoapi-nested-parse:: Simple Go engine wrapper using sgfmill instead of sente. This module provides a compatibility layer to replace sente with sgfmill, which is compatible with Python 3.12. Classes ------- .. autoapisummary:: haive.games.go.go_engine.GoGame haive.games.go.go_engine.sgf Functions --------- .. autoapisummary:: haive.games.go.go_engine.Game haive.games.go.go_engine.dumps_sgf haive.games.go.go_engine.loads_sgf Module Contents --------------- .. py:class:: GoGame(board_size = 19) Simple Go game wrapper using sgfmill. Init . :param board_size: [TODO: Add description] .. py:method:: play_move(color, move) Play a move on the board. :param color: 'b' for black, 'w' for white :param move: (row, col) tuple or None for pass .. py:method:: to_sgf() Convert game to SGF format. .. py:method:: turn() Get current player to move. .. py:class:: sgf SGF compatibility wrapper. .. py:method:: dumps(game) :staticmethod: Save game to SGF. .. py:method:: loads(sgf_string) :staticmethod: Load game from SGF. .. py:function:: Game(board_size = 19) Create a new Go game. .. py:function:: dumps_sgf(game) Convert game to SGF string. .. py:function:: loads_sgf(sgf_string) Load a game from SGF string.