fix error when creating GameStorage object

This commit is contained in:
2024-04-13 12:06:51 +02:00
parent b48cfe811e
commit f472ddd0d9
+1 -1
View File
@@ -79,7 +79,7 @@ class Server:
# start is called when your Battlesnake begins a game
def _start(self, game_state:dict):
if self.store_game_state:
self.running_games[game_state["game"]["id"]] = GameStorage(self.snake.__class__.__name__, path=os.path.join(self.data_path, 'data', 'history'))
self.running_games[game_state["game"]["id"]] = GameStorage(self.snake_type, path=os.path.join(self.data_path, 'data', 'history'))
self.running_games[game_state["game"]["id"]].start_new_game(game_state["game"], game_state["board"], game_state["you"])
self.running_snake[game_state["game"]["id"]] = SnakeBuilder.build(self.snake_type)