From f1399064a20c04feb89cc9a416bac3ee129c7d5e Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 18 Oct 2018 11:30:14 +0200 Subject: [PATCH] Fix Simulation using RuleSet range for neighbor checks --- lib/src/Simulation.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/Simulation.dart b/lib/src/Simulation.dart index a3f99c5..90969ce 100644 --- a/lib/src/Simulation.dart +++ b/lib/src/Simulation.dart @@ -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) {