diff options
Diffstat (limited to 'imago/engine/core.py')
-rw-r--r-- | imago/engine/core.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/imago/engine/core.py b/imago/engine/core.py index 4e383d4..2bf7d5a 100644 --- a/imago/engine/core.py +++ b/imago/engine/core.py @@ -1,6 +1,7 @@ """Imago GTP engine""" -from imago.engine.decisionAlgorithmFactory import DecisionAlgorithms, DecisionAlgorithmFactory +from imago.data.enums import DecisionAlgorithms +from imago.engine.createDecisionAlgorithm import create as createDA from imago.gameLogic.gameState import GameState DEF_SIZE = 9 @@ -14,8 +15,7 @@ class GameEngine: self.komi = DEF_KOMI self.gameState = GameState(DEF_SIZE) self.daId = decisionAlgorithmId - self.daFactory = DecisionAlgorithmFactory() - self.da = self.daFactory.create(self.daId, self.gameState.lastMove) + self.da = createDA(self.daId, self.gameState.lastMove) def setBoardsize(self, newSize): """Changes the size of the board. @@ -23,7 +23,7 @@ class GameEngine: It is wise to call clear_board after this command. """ self.gameState = GameState(newSize) - self.da = self.daFactory.create(self.daId, self.gameState.lastMove) + self.da = createDA(self.daId, self.gameState.lastMove) def clearBoard(self): """The board is cleared, the number of captured stones reset to zero and the move |