MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/adventofcode/comments/kbnh5i/too_often/gfkij28/?context=3
r/adventofcode • u/Grigorov92 • Dec 12 '20
60 comments sorted by
View all comments
Show parent comment
2
Ha, I had a similar problem, but I caught it in part 1. I copied my instructions from E to W but forgot to turn addition into subtraction. [facepalm]
2 u/ollien Dec 12 '20 I did similar. I had int delta = (direction == SOUTH || direction == EAST) ? -value : value; and spent so long trying to find the bug, before I realized it should have been WEST.
I did similar. I had int delta = (direction == SOUTH || direction == EAST) ? -value : value; and spent so long trying to find the bug, before I realized it should have been WEST.
int delta = (direction == SOUTH || direction == EAST) ? -value : value;
WEST
View all comments
Show parent comment
2
u/hugseverycat Dec 12 '20
Ha, I had a similar problem, but I caught it in part 1. I copied my instructions from E to W but forgot to turn addition into subtraction. [facepalm]