mirror of
https://github.com/wled/WLED.git
synced 2025-04-23 22:37:18 +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++;
|
||||
bool colorFound = false;
|
||||
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]) {
|
||||
colorsCount[k].count++;
|
||||
colorFound = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user