diff options
author | sanine <sanine.not@pm.me> | 2023-11-09 16:46:33 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-11-09 16:46:33 -0600 |
commit | 55b714abf83e01aa0ff513ad6ba4978f4b4da6cd (patch) | |
tree | 71518c2a6546681724f095424b755c2ab1ec8ecd /src/world/lattice.test.js | |
parent | 819d8a51c5ba8b1bec06163dba9c3e0212f1120a (diff) |
add basic game of life lattice rules
Diffstat (limited to 'src/world/lattice.test.js')
-rw-r--r-- | src/world/lattice.test.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/world/lattice.test.js b/src/world/lattice.test.js index 7c71d04..c2fdb6b 100644 --- a/src/world/lattice.test.js +++ b/src/world/lattice.test.js @@ -34,6 +34,15 @@ test("growth update rule", () => { }); +//test("agents cannot move into non-empty tiles", () => { +// const lattice = [[ {type: 'empty', flags: {}}, {type: 'filled', flags: {}} ]]; +// const bad_prop = [{ agent_updates: [{ agent_id: 14, x: 1, y: 0 }] }]; +// expect(lattice_valid(lattice, bad_prop)).toBe(false); +// const good_prop = [{ agent_updates: [{ agent_id: 14, x: 0, y: 0 }] }]; +// expect(lattice_valid(lattice, bad_prop)).toBe(true); +//}); + + test("growth update rule applied", () => { const lattice = [[ { type: 'empty', flags: {} }, |