Skip to content

Commit

Permalink
chore: remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaxwood committed Dec 16, 2023
1 parent ef009ab commit f622503
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/day16.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ def load(file)
end

def part1(start, facing)
best = 0
iterations = 0
visited = Set.new([[start, facing]])
queue = []

Expand All @@ -46,7 +44,6 @@ def part1(start, facing)
end

while queue.any?
iterations += 1
((x, y), direction) = queue.shift
move = case direction
when :east
Expand All @@ -64,7 +61,7 @@ def part1(start, facing)
next unless @map.key?(move)

@direction_map[[@map[move], direction]].each do |new_direction|
if !visited.include?([move, new_direction])
unless visited.include?([move, new_direction])
queue << [move, new_direction]
visited << [move, new_direction]
end
Expand Down

0 comments on commit f622503

Please sign in to comment.