Skip to content

Commit

Permalink
[2024/8] use .verbose rather than .v
Browse files Browse the repository at this point in the history
  • Loading branch information
StarlitGhost committed Dec 8, 2024
1 parent 3f92987 commit 067c5c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 2024/8/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def main():
for antenna, positions in antennas.items():
for combo in combinations(positions, 2):
antinode_positions.update(calc_antinodes(*combo, grid))
if aoc.args().v:
if aoc.args().verbose:
print(grid.render_with_overlays([{pos: '#' for pos in antinode_positions},
{p: freq for freq, pos in antennas.items() for p in pos}]))
print(f"p1: {len(antinode_positions)}")
Expand All @@ -63,7 +63,7 @@ def main():
for antenna, positions in antennas.items():
for combo in combinations(positions, 2):
antinode_positions.update(calc_antinodes(*combo, grid, resonates=True))
if aoc.args().v:
if aoc.args().verbose:
print(grid.render_with_overlays([{pos: '#' for pos in antinode_positions},
{p: freq for freq, pos in antennas.items() for p in pos}]))
print(f"p2: {len(antinode_positions)}")
Expand Down

0 comments on commit 067c5c2

Please sign in to comment.