This may just be an issue with my understanding (math isn’t my strong suit). On page 92 (PDF):
Range iterators expect that the starting value of a range will be the minimum value, and the destination the maximum. This function uses
min()
andmax()
to find the lowest and highest of a pair of values—in this case, the starting position. It then iteratesx
from the start to the end of the corridor, carving the tunnel along the way.Add a second function to add horizontal tunnels in the same way, but traversing the
x
axis instead of they
axis:
Is this supposed to be y
instead of x
?
It then iterates
x
from the start to the end of the corridor, carving the tunnel along the way.