generate_pos

toasty.pyramid.generate_pos(depth)[source]

Generate a pyramid of tile positions.

The generate proceeds in a broadly deeper-first fashion. In particular, if a position p is yielded, you can assume that its four children have been yielded previously, unless the depth of p is equal to depth.

Parameters:
depthint

The tile depth to recurse to.

Yields:
posPos

An individual position to process.