ran rubocop
parent
c629ccd63f
commit
19a0563550
|
@ -2,7 +2,8 @@
|
|||
|
||||
commands = File.readlines('./input').map(&:split).map { [_1.to_sym, _2.to_i] }
|
||||
# Part 1
|
||||
dist, depth = 0,0
|
||||
dist = 0
|
||||
depth = 0
|
||||
commands.each do |command, unit|
|
||||
case command
|
||||
when :forward
|
||||
|
@ -17,7 +18,9 @@ end
|
|||
p dist * depth
|
||||
|
||||
# Part 2
|
||||
dist, depth, aim = 0,0,0
|
||||
dist = 0
|
||||
depth = 0
|
||||
aim = 0
|
||||
commands.each do |command, unit|
|
||||
case command
|
||||
when :forward
|
||||
|
|
Loading…
Reference in New Issue