The demo shows a crude example of Wave Function Collapse to change the tiles in the first frames of playing the game.
It appears however that I was a little too ambitions and tried to also change the palette colours for the 2-bit tiles dynamically using map's remap function. It appears that the palette used is only the last tile's palette. For example, if you move the map (via the directional buttons) in such a way that you have a "grass" tile in the lower right corner, the whole map gets coloured green.
I will try and behave for the next cart, though... 😏