summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/simulation/lattice_rules.test.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/simulation/lattice_rules.test.js b/src/simulation/lattice_rules.test.js
index 681b721..9a6a344 100644
--- a/src/simulation/lattice_rules.test.js
+++ b/src/simulation/lattice_rules.test.js
@@ -81,3 +81,20 @@ test("glider", () => {
[ D, D, D, D, D, D ],
]);
});
+
+
+test("beehive", () => {
+ const L = { type: 'active', flags: {} };
+ const D = { type: 'empty', flags: {} };
+ const lattice = [
+ [ D, D, D, D, D, D ],
+ [ D, D, L, L, D, D ],
+ [ D, L, D, D, L, D ],
+ [ D, D, L, L, D, D ],
+ [ D, D, D, D, D, D ],
+ ];
+
+ const world = { lattice, lattice_rules, agents: [], senses: [], actions: [] };
+ //expect(world_update(world).lattice).toEqual([
+ expect(apply(world_update, 1, world).lattice).toEqual(lattice);
+});