I've solved it, but man is it ugly.
# advent-of-code
t
I've solved it, but man is it ugly.
😂 1
r
Is it about part1 picture? 🙂
t
No, my code is kinda ugly. I'll clean it up later after work. I just don't like how I did things, mostly with the x/y coordinate things. My original Point class has y descending below the axis, and AoC assumes "screen mode" which has it increasing. It's just leading to screwy implementations for me.
r
I see. As you have nice and interesting blog you have to care more than others about code's clarity.
s
One day an AoC problem will use map coords instead of screen coords (but not today) 😄
k
I just went straight to coding, ignoring any coordinate explanation. I knew I was most likely gonna get letters at the end I it was not worth the time to look at how to move my bot. I just used
Point.getQuadNeighbours()[dir]
and hoped I was gonna be able to read it at the end. It ended up being flipped vertical but it could has well have rotated or flipped diagonally.
I am thinking of adding a function that set's the coordinate direction of my program and then have the point class use those to decipher concepts like
up
. It then can than also be used for printing grids
j
Ah, glad to see more people have the same issue with the coordinates! #yourenotalone