diff --git a/nicsoft/niclink/__main__.py b/nicsoft/niclink/__main__.py index 9f1cfc3..12d806d 100644 --- a/nicsoft/niclink/__main__.py +++ b/nicsoft/niclink/__main__.py @@ -684,20 +684,20 @@ def show_board_diff(self, board1: chess.Board, board2: chess.Board) -> bool: py_square ) or self.square_in_last_move(square): # record the diff in diff array, while keeping the last move lit up - self.logger.info( - "man.show_board_diff(...): Diff found at square %s", square - ) - # do not record diff's on the move squares, but light them up if not self.square_in_last_move(square): diff = True - # add square to list off diff squares - diff_cords = square_cords(square) - diff_squares.append(square) - - diff_map[diff_cords[1]] = ( - zeros[: diff_cords[0]] + "1" + zeros[diff_cords[0] :] + self.logger.info( + "man.show_board_diff(...): Diff found at square %s", square ) + # add square to list off diff squares + diff_cords = square_cords(square) + diff_squares.append(square) + + diff_map[diff_cords[1]] = ( + zeros[: diff_cords[0]] + "1" + zeros[diff_cords[0] :] + ) + if diff: # set all the led's that differ self.set_all_LEDs(diff_map)