How it worksEvery cell starts holding all six terrain types as a bitmask of possibilities. Two steps alternate: collapse picks some uncertain cells and randomly commits each to one of its options, then propagate enforces the rules — water can't touch grass, sand sits between, and so on — by intersecting each cell's options with what its neighbours still allow. That constraint ripples outward, sometimes forcing distant cells, until the whole grid settles into a layout where every adjacency is legal. A higher collapse chance resolves it faster but leaves the propagation less room to spread.