Remove unused functions from previous years.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Mikael CAPELLE 2024-12-11 15:48:38 +01:00
parent 356fd35b08
commit 721d69e766
3 changed files with 0 additions and 24 deletions

View File

@ -52,7 +52,6 @@ class Solver(BaseSolver):
m2 += molecule[i] m2 += molecule[i]
i += 1 i += 1
# print(m2)
molecule = m2 molecule = m2
yield count yield count

View File

@ -10,17 +10,6 @@ T = TypeVar("T")
Tower: TypeAlias = NDArray[np.bool] Tower: TypeAlias = NDArray[np.bool]
def print_tower(tower: Tower, out: str = "#"):
print("-" * (tower.shape[1] + 2))
non_empty = False
for row in reversed(range(1, tower.shape[0])):
if not non_empty and not tower[row, :].any():
continue
non_empty = True
print("|" + "".join(out if c else "." for c in tower[row, :]) + "|")
print("+" + "-" * tower.shape[1] + "+")
def tower_height(tower: Tower) -> int: def tower_height(tower: Tower) -> int:
return int(tower.shape[0] - tower[::-1, :].argmax(axis=0).min() - 1) return int(tower.shape[0] - tower[::-1, :].argmax(axis=0).min() - 1)

View File

@ -24,18 +24,6 @@ def min_max_yx(positions: set[tuple[int, int]]) -> tuple[int, int, int, int]:
return min(ys), min(xs), max(ys), max(xs) return min(ys), min(xs), max(ys), max(xs)
def print_positions(positions: set[tuple[int, int]]):
min_y, min_x, max_y, max_x = min_max_yx(positions)
print(
"\n".join(
"".join(
"#" if (y, x) in positions else "." for x in range(min_x - 1, max_x + 2)
)
for y in range(min_y - 1, max_y + 2)
)
)
def round( def round(
positions: set[tuple[int, int]], positions: set[tuple[int, int]],
directions: Directions, directions: Directions,