generated from public/aoc_template
day14 - cleanup typing annotations
This commit is contained in:
parent
c353f58280
commit
fb45c9440d
9
day14.py
9
day14.py
@ -3,6 +3,9 @@ from tools.tools import compare
|
||||
from typing import Any
|
||||
|
||||
|
||||
type Robot = tuple[tuple[int, int], tuple[int, int]]
|
||||
|
||||
|
||||
class Day(AOCDay):
|
||||
inputs = [
|
||||
[
|
||||
@ -14,7 +17,7 @@ class Day(AOCDay):
|
||||
],
|
||||
]
|
||||
|
||||
def parse_input(self) -> list[tuple[tuple[int, int], tuple[int, int]]]:
|
||||
def parse_input(self) -> list[Robot]:
|
||||
robots = []
|
||||
for line in self.getInput():
|
||||
p, v = line.split()
|
||||
@ -24,9 +27,7 @@ class Day(AOCDay):
|
||||
|
||||
return robots
|
||||
|
||||
def move_robots(
|
||||
self, robots: list[tuple[tuple[int, int], tuple[int, int]]], steps: int = 100
|
||||
) -> tuple[tuple[int, int], list[tuple[tuple[int, int], tuple[int, int]]]]:
|
||||
def move_robots(self, robots: list[Robot], steps: int = 100) -> tuple[tuple[int, int], list[Robot]]:
|
||||
if self.is_test():
|
||||
dim = (11, 7)
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user