Add game export
This commit is contained in:
22
rpi/models/game.py
Normal file
22
rpi/models/game.py
Normal 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
|
||||
Reference in New Issue
Block a user