Skip to content

Commit aa3c9c0

Browse files
committed
Solve day 19 2021
1 parent 88a78d0 commit aa3c9c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

2021/19/19both.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,19 @@ def viewpoint(base: Scanner, to: Scanner) -> Iterator[tuple[set[Position], Posit
7272
yield absolute_beacon_positions, (dx, dy, dz)
7373

7474

75-
checked_scanners = set()
75+
checked_scanner_ids = set()
7676
paired_scanner_ids = {0}
7777
while len(paired_scanner_ids) != len(scanners):
7878
paired_scanners = [
7979
scanner
8080
for scanner in scanners
81-
if scanner.id_ in paired_scanner_ids and scanner.id_ not in checked_scanners
81+
if scanner.id_ in paired_scanner_ids and scanner.id_ not in checked_scanner_ids
8282
]
8383
unpaired_scanners = [
8484
scanner for scanner in scanners if scanner.id_ not in paired_scanner_ids
8585
]
8686
for paired_scanner in paired_scanners:
87-
checked_scanners.add(paired_scanner.id_)
87+
checked_scanner_ids.add(paired_scanner.id_)
8888
for unpaired_scanner in unpaired_scanners:
8989
for beacon_positions, scanner_position in viewpoint(
9090
base=paired_scanner, to=unpaired_scanner

0 commit comments

Comments
 (0)