Browse Source

Correcting dataclass for day02

pull/3/head
Ryan Reed 3 years ago
parent
commit
829fd34265
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      puzzles/day02.py

+ 2
- 0
puzzles/day02.py View File

@ -32,6 +32,7 @@ class Location:
return self.horizontal * self.depth
@dataclass
class Puzzle1(Location):
def forward(self, distance: int) -> None:
self.horizontal += distance
@ -43,6 +44,7 @@ class Puzzle1(Location):
self.depth += distance
@dataclass
class Puzzle2(Location):
def forward(self, distance: int) -> None:
self.horizontal += distance


Loading…
Cancel
Save