Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
因此,我在 GameMaker 中的一款游戏中实现了元胞自动机。但是有大量不连贯的洞穴......那么有人知道如何实现像洪水填充这样的算法吗?
让您的自动机检查它们的直接邻居(上、下、左、右四个像素)。如果选中的邻居是他们的目标颜色,则在那里生成一个自动机。