Skip to content

Commit

Permalink
Day10
Browse files Browse the repository at this point in the history
  • Loading branch information
mevdschee committed Dec 10, 2019
1 parent 30a2b73 commit 2d8807c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions day10/part2.py
Expand Up @@ -43,10 +43,10 @@
best_position = (sx, sy)
best_moves = moves

clockwise_moves = [k for k, v in sorted(best_moves.items(), key=lambda i: i[1])]
clockwise_moves = sorted(best_moves.items(), key=lambda i: i[1])
sx, sy = best_position
shot = 0
for dx, dy in clockwise_moves:
for (dx, dy), angle in clockwise_moves:
for i in range(1, max(w, h)):
x, y = sx + i * dx, sy + i * dy
if x < 0 or y < 0 or x >= w or y >= h:
Expand Down

0 comments on commit 2d8807c

Please sign in to comment.