diff --git a/src/blunderboard/__init__.py b/src/blunderboard/__init__.py index 2c681c3..f847e90 100644 --- a/src/blunderboard/__init__.py +++ b/src/blunderboard/__init__.py @@ -1,10 +1,13 @@ +from blunderboard.blunderevaluator import BlunderEvaluator from blunderboard.boardreader import BoardReader from blunderboard.movegenerator import MoveGenerator from time import sleep def main(): - reader = BoardReader(MoveGenerator()) + blunder_evaluator = BlunderEvaluator() + move_generator = MoveGenerator(blunder_evaluator) + reader = BoardReader(move_generator) while True: reader.scan() sleep(0.1) diff --git a/src/blunderboard/blunderevaluator.py b/src/blunderboard/blunderevaluator.py new file mode 100644 index 0000000..e7a6c31 --- /dev/null +++ b/src/blunderboard/blunderevaluator.py @@ -0,0 +1,6 @@ +class BlunderEvaluator: + def reset(self): + pass + + def move(self, move): + pass diff --git a/src/blunderboard/movegenerator.py b/src/blunderboard/movegenerator.py index 5e17210..3cb50c9 100644 --- a/src/blunderboard/movegenerator.py +++ b/src/blunderboard/movegenerator.py @@ -1,8 +1,15 @@ +from blunderboard.blunderevaluator import BlunderEvaluator + + class MoveGenerator: columns = "abcdefgh" + def __init__(self, blunder_evaluator: BlunderEvaluator): + self.blunder_evaluator = blunder_evaluator + def reset(self) -> None: print("reset") + self.blunder_evaluator.reset() def put(self, row: int, column: int) -> None: print("put %c%d" % (self.columns[column], row + 1))