Swift Implementation of Wave Function Collapse using the tiling method. The project is structured in a way where it is pretty easy to plug in new tiles and rules.
Next steps: Implement some kind of backtracking. The algorithm fails to find possible tiles for some spaces in the grid. Adding more tiles helps remedy this, but a good backtracking method could result in a completely tiled grid each run. Recalculating the entropy (possible tiles & rotations) for the neighbors of neighbors may also help make more forward looking selections that result in less failures down the line.