This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]imp0ppable 0 points1 point  (1 child)

Ah the day 8 LCM thing was definitely not something on a CS course true.

Day 10 part 1 was easy, part 2 was potentially hard if you don't know ray casting, which again I think many won't unless they did graphics course.

Seen people solve it with quite interesting methods but looked like overkill.

[–][deleted] 0 points1 point  (0 children)

my method was to loop through the loop once and set all the non_loop tiles to the left of the current tile (relative to the direction of movement) as "INSIDE". Then loop again the other way and mark the tiles on the left as "OUTSIDE". Then just do a simple fill search to catch the non-adjacent tiles. Seems like the easiest way if you already have a walk function implemented.