4 ms·
you're killing your stack with redundant recursion, here: return findWall(map, position.add(deltaX, deltaY), deltaX, deltaY); no reason not to loop here.
by high_byte 7y ago
you're killing your stack with redundant recursion, here:
return findWall(map, position.add(deltaX, deltaY), deltaX, deltaY);
no reason not to loop here.