mirror of
https://github.com/wled/WLED.git
synced 2025-07-26 20:26:34 +00:00
fix reproduction in game of life
A typo caused broken counting of the most common color in neighbouring cells and blocked reproduction in some directions.
This commit is contained in:
parent
2448266d7c
commit
39512da74e
@ -5137,7 +5137,7 @@ uint16_t mode_2Dgameoflife(void) { // Written by Ewoud Wijma, inspired by https:
|
|||||||
neighbors++;
|
neighbors++;
|
||||||
bool colorFound = false;
|
bool colorFound = false;
|
||||||
int k;
|
int k;
|
||||||
for (k=0; k<9 && colorsCount[i].count != 0; k++)
|
for (k=0; k<9 && colorsCount[k].count != 0; k++)
|
||||||
if (colorsCount[k].color == prevLeds[xy]) {
|
if (colorsCount[k].color == prevLeds[xy]) {
|
||||||
colorsCount[k].count++;
|
colorsCount[k].count++;
|
||||||
colorFound = true;
|
colorFound = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user