summaryrefslogtreecommitdiffstats
path: root/5.py
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-12-15 22:27:25 +0000
committerTomasz Kramkowski <tk@the-tk.com>2021-12-16 01:33:43 +0000
commite22d2d2e3e1d1427caeeb3f106680bc3edceb39f (patch)
treeb1b977a2178d11c35cf4125648476bdbbee7c14b /5.py
parent1d03c102f813f819697ea95f96eee6dbe0464be1 (diff)
downloadaoc2021-e22d2d2e3e1d1427caeeb3f106680bc3edceb39f.tar.gz
aoc2021-e22d2d2e3e1d1427caeeb3f106680bc3edceb39f.tar.xz
aoc2021-e22d2d2e3e1d1427caeeb3f106680bc3edceb39f.zip
utils: Point2D and related functions
Diffstat (limited to '5.py')
-rw-r--r--5.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/5.py b/5.py
index 1e61efb..802ccc7 100644
--- a/5.py
+++ b/5.py
@@ -1,11 +1,9 @@
from collections import defaultdict, namedtuple
-from utils import open_day
-
-Pos = namedtuple('Pos', ['x', 'y'])
+from utils import open_day, Point2D
vents = [
tuple(
- Pos(*map(int, h.split(',')))
+ Point2D(*map(int, h.split(',')))
for h in l.rstrip().split(' -> ')
)
for l in open_day(5).read().rstrip().split('\n')