Add game export

This commit is contained in:
2026-01-05 11:34:00 +01:00
parent 5ec6f5a79c
commit d9e97b0939
4 changed files with 73 additions and 25 deletions

22
rpi/models/game.py Normal file
View File

@@ -0,0 +1,22 @@
class Game:
_white_name : str
_black_name : str
_time_control : int
_increments : int
_moves : list[str]
_base_fen : str
def __init__(self, white_name : str, black_name : str, time_control : int, increment : int):
self._white_name = white_name
self._black_name = black_name
self._time_control = time_control
self._increments = increment
self.moves = []
self._base_fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
def add_move(self, fen : str):
self.moves.append(fen)
def get_moves(self):
return self.moves