-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday19_task1.py
More file actions
37 lines (23 loc) · 901 Bytes
/
Copy pathday19_task1.py
File metadata and controls
37 lines (23 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
###############################################################################
# Day x, Task y #
###############################################################################
import aoc_util
day = 19
data_str = """"""
class Scanner:
def __init__(self, data_set):
[data, index] = data_set
self.beacons = set()
while index < len(data) and data[index] != "":
self.beacons.add(tuple([int(x) for x in data[index].split(",")]))
index += 1
data_set[1] = index + 2
def connect_to_scanner(self, other):
pass
def task(data_set: list[str]) -> int:
data_set = [data_set, 2]
scanners = []
while data_set[1] < len(data_set[0]):
scanners.append(Scanner(data_set))
aoc_util.run_with_data_str(task, data_str)
aoc_util.run_with_data_set(task, day)