diff --git a/four_letter_blocks/__main__.py b/four_letter_blocks/__main__.py index 614b535..e095dbf 100644 --- a/four_letter_blocks/__main__.py +++ b/four_letter_blocks/__main__.py @@ -27,7 +27,7 @@ from four_letter_blocks.font_list_item import FontListItem from four_letter_blocks.line_deduper import LineDeduper from four_letter_blocks.main_window import Ui_MainWindow -from four_letter_blocks.puzzle import Puzzle +from four_letter_blocks.puzzle import Puzzle, RotationsDisplay from four_letter_blocks.puzzle_pair import PuzzlePair from four_letter_blocks.puzzle_set import PuzzleSet @@ -401,7 +401,9 @@ def calculate_needed_counts(self) -> typing.Counter[str]: front_puzzle, back_puzzle = self.pair_puzzles assert front_puzzle is not None assert back_puzzle is not None - needed_counts = back_puzzle.flipped_shape_counts + front_puzzle.rotations_display = RotationsDisplay.FRONT + back_puzzle.rotations_display = RotationsDisplay.BACK + needed_counts = back_puzzle.shape_counts needed_counts.subtract(front_puzzle.shape_counts) return needed_counts diff --git a/four_letter_blocks/evo_packer.py b/four_letter_blocks/evo_packer.py index 7328bbc..490c643 100644 --- a/four_letter_blocks/evo_packer.py +++ b/four_letter_blocks/evo_packer.py @@ -279,6 +279,7 @@ def setup(self, shape_counts=shape_counts) if fitness_calculator is None: fitness_calculator = PackingFitnessCalculator() + fitness_calculator.summaries.clear() self.evo = Evolution( pool_size=1000,