From f7b0ed22b2fd0ddafc4a84dde1ad8e3208144844 Mon Sep 17 00:00:00 2001
From: sanine <sanine.not@pm.me>
Date: Sat, 11 Nov 2023 15:04:36 -0600
Subject: gol changes make sound

---
 src/world/lattice.test.js | 61 +++++++++++++++++++++++++----------------------
 1 file changed, 32 insertions(+), 29 deletions(-)

(limited to 'src/world/lattice.test.js')

diff --git a/src/world/lattice.test.js b/src/world/lattice.test.js
index c2fdb6b..d1bdd13 100644
--- a/src/world/lattice.test.js
+++ b/src/world/lattice.test.js
@@ -77,32 +77,35 @@ test("check proposals agains lattice for validity", () => {
 });
 
 
-test("proposals update cell flags appropriately", () => {
-  const lattice = [
-    [ 
-      { type: 'empty', flags: { step: 1} }, 
-      { type: 'empty', flags: {} }, 
-      { type: 'plant', flags: { foo: 'bar' } },
-    ]
-  ];
-
-  // flags are reset each time step
-  expect(lattice_apply(lattice, [{ world_updates:[{ x: 1, y: 0, from: 'empty', to: 'plant' }]}])).toEqual([[
-    { type: 'empty', flags: {} }, 
-    { type: 'plant', flags: {} }, 
-    { type: 'plant', flags: {} },
-  ]]);
-
-  // flags are combined when updating
-  expect(lattice_apply(lattice, [
-    { world_updates: [{ x: 1, y: 0, flags: { foo: 'bar' } } ]},
-    { world_updates: [{ x: 1, y: 0, from: 'empty', to: 'plant', flags: { baz: 'baz' } } ]},
-    { world_updates: [{ x: 0, y: 0, from: 'empty', to: 'plant', flags: { foo: 'foo' } } ]},
-    { world_updates: [{ x: 0, y: 0, flags: { beep: 'boop' } } ]},
-  ])).toEqual([[
-    { type: 'plant', flags: { foo: 'foo', beep: 'boop' } }, 
-    { type: 'plant', flags: { foo: 'bar', baz: 'baz' } }, 
-    { type: 'plant', flags: {} },
-  ]]);
-
-});
+// this test is no longer relevant because resetting the cell flags is taken care of by world_update,
+// not lattice_apply
+//
+//test("proposals update cell flags appropriately", () => {
+//  const lattice = [
+//    [ 
+//      { type: 'empty', flags: { step: 1} }, 
+//      { type: 'empty', flags: {} }, 
+//      { type: 'plant', flags: { foo: 'bar' } },
+//    ]
+//  ];
+//
+//  // flags are reset each time step
+//  expect(lattice_apply(lattice, [{ world_updates:[{ x: 1, y: 0, from: 'empty', to: 'plant' }]}])).toEqual([[
+//    { type: 'empty', flags: {} }, 
+//    { type: 'plant', flags: {} }, 
+//    { type: 'plant', flags: {} },
+//  ]]);
+//
+//  // flags are combined when updating
+//  expect(lattice_apply(lattice, [
+//    { world_updates: [{ x: 1, y: 0, flags: { foo: 'bar' } } ]},
+//    { world_updates: [{ x: 1, y: 0, from: 'empty', to: 'plant', flags: { baz: 'baz' } } ]},
+//    { world_updates: [{ x: 0, y: 0, from: 'empty', to: 'plant', flags: { foo: 'foo' } } ]},
+//    { world_updates: [{ x: 0, y: 0, flags: { beep: 'boop' } } ]},
+//  ])).toEqual([[
+//    { type: 'plant', flags: { foo: 'foo', beep: 'boop' } }, 
+//    { type: 'plant', flags: { foo: 'bar', baz: 'baz' } }, 
+//    { type: 'plant', flags: {} },
+//  ]]);
+//
+//});
-- 
cgit v1.2.1