I have an RGB array of size R x C. I want to apply a cellular automata set of rules that work with these cells of multiple colours.
For example, if I have an empty cell (represented by white); that has 4 green neighbours and 4 blue neighbours, how can I make a red cell "spawn" in that empty cell based on the conditions of the surrounding cells being green and blue.
Another example would be, if an empty cell has a green cell next to it, how can I make it that a cell is never "born" in that cell?
Thanks
Best Answer