When I check the neighbors of a tile I see if the current tile is on one of the border tiles of the map. If it is, I simply do not check the neighbor on the other side of that border. I’m uncertain if this is the most efficient solution, or if I should simply populate all the border tiles with walls so I can just use my regular methods of checking for walls. I’m planning to check this out using timers. Just download the blueprint if you want to see exactly how I solved it. It’s at the bottom left of the blueprint (the one marked “Check if tiles are out of bounds” in the picture).