From c1a13b373e29ea413d2e86402d32e320d99cddb3 Mon Sep 17 00:00:00 2001 From: xXUnique31Xx Date: Mon, 1 Jul 2024 22:08:53 +0200 Subject: [PATCH] create own instance of GameManager --- player.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/player.py b/player.py index 311e073..b9d8d38 100644 --- a/player.py +++ b/player.py @@ -1,5 +1,6 @@ from view import GameView from algorithm import GameAI +from controller import GameManager class Player(): @@ -17,7 +18,7 @@ class HumanPlayer(Player): def __init__(self, color, view): super().__init__(color) self.view = view - self.game_manager = view.game_manager + self.game_manager = GameManager(view) def make_move(self, start_pos, goal_pos, board, update=True): """Method to make a move.""" @@ -43,7 +44,7 @@ def __init__(self, color, board, view, enemy): self.is_currently_playing = False self.game_ai = GameAI(board, view, color, enemy) self.view = view - self.game_manager = view.game_manager + self.game_manager = GameManager(view) def make_move(self, board, update=True): """Method to make a move."""