Beispiel #1
0
 def __init__(self,
              board: Board,
              max_restarts: int,
              max_iter: int,
              stop_if_found: bool = False):
     """
     :type board: Sudoku board in initial state
     :type max_restarts: max number of restarts
     :param max_iter: Maximal number of iterations the solver runs
     """
     self._board = board
     self._max_iter = max_iter
     self._max_restarts = max_restarts
     self._stop_if_found = stop_if_found
     # get size of the board
     self._board_size, _ = board.bounds()
     self._results = []