diff --git a/day16.py b/day16.py index 1ed734f..9e6cf84 100644 --- a/day16.py +++ b/day16.py @@ -1,5 +1,4 @@ from collections import deque -from dataclasses import dataclass from itertools import product from tools.aoc import AOCDay from typing import Any @@ -12,10 +11,10 @@ class Valve: self.tunnels: set = set() -@dataclass(frozen=True) class Tunnel: - target: Valve - length: int = 1 + def __init__(self, target: Valve, length: int = 1): + self.target: Valve = target + self.length: int = length def __str__(self): return f"Tunnel(target={self.target.name}, length={self.length})"