explain to me in simple terms how wave function collapse works in the context of procedural generation for games. Use words with all capital letters to highlight key points, but make sure that words with all capital letters appear less than 3 times
user