This commit is contained in:
2026-01-05 11:58:07 +01:00
parent 6a47d83ada
commit 850ef5f623
2 changed files with 11 additions and 2 deletions

View File

@@ -21,3 +21,12 @@ class Game:
def get_moves(self):
return self.moves
def to_dict(self):
return {
"white_name": self._white_name,
"black_name": self._black_name,
"time_control": self._time_control,
"increment": self._increments,
"moves": self._moves,
}

View File

@@ -62,7 +62,7 @@ class GameService:
self._on_terminated = callback
def _notify(self):
game_data = json.dumps(self._game)
game_data = json.dumps(self._game.to_dict())
self._on_terminated(game_data)