This commit is contained in:
parent
2b884fab65
commit
443632378e
|
@ -37,12 +37,8 @@ impl Day for Day02 {
|
||||||
fw += n;
|
fw += n;
|
||||||
depth += aim * n;
|
depth += aim * n;
|
||||||
}
|
}
|
||||||
Instruction::Down(n) => {
|
Instruction::Down(n) => aim += n,
|
||||||
aim += n;
|
Instruction::Up(n) => aim -= n,
|
||||||
}
|
|
||||||
Instruction::Up(n) => {
|
|
||||||
aim -= n;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
format!("{}", depth * fw)
|
format!("{}", depth * fw)
|
||||||
|
|
Loading…
Reference in a new issue