this post was submitted on 10 Dec 2024
6 points (100.0% liked)
NotAwfulTech
386 readers
5 users here now
a community for posting cool tech news you don’t want to sneer at
non-awfulness of tech is not required or else we wouldn’t have any posts
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Day 15
p1
Pretty easy. Just check in the direction you want to push if you have space.p2 DNF
Currently debugging with test cases from the subreddit. I’ve also created a shitty visualiser for it, stay tuned!Re: p2
Definitely a bit tedious, I had to "play" a whole session to spot bugs that I had. It took me far longer than average. I had buggy dissepearing boxes because of update order, I would reccomend a basic test case of pushing a line/pyramid of boxes in every direction.P2 complete
The issue with my code was that I didn't make a push atomic, i.e. I would move boxes even if their ancestors couldn't be pushed. Making a list of candidate boxes to push solved this.Here's the visualisation of the complete solution, though it doesn't show the last 100 frames or so. Please forgive me
https://imgur.com/a/RL50MaC