Fix Simulation using RuleSet range for neighbor checks

This commit is contained in:
Unknown 2018-10-18 11:30:14 +02:00
parent e13962f371
commit f1399064a2
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ class Simulation {
for (int i = 0; i < map.length; i++) {
math.Point p = map.toCoordinates(i);
bool cell = map[i];
int neighbors = getNeighbors(p.x, p.y, 1);
int neighbors = getNeighbors(p.x, p.y, rules.range);
if (cell == false && rules.checkBirth(neighbors) == true) {
stateChanges[i] = true;
} else if (cell == true && rules.checkSurvival(neighbors) == false) {