diff options
author | sanine <sanine.not@pm.me> | 2023-11-16 14:50:00 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-11-16 14:50:00 -0600 |
commit | f9fc4d26ec5fca9ee175c8a6fbcdd0fa36f10947 (patch) | |
tree | f190e6e465bb563c608a916f41fc8bf686ea2897 /src/simulation/postprocess.test.js | |
parent | 7825b92ce3be95a0ce1dfea9388adbaadce83b1f (diff) |
clear out js files
Diffstat (limited to 'src/simulation/postprocess.test.js')
-rw-r--r-- | src/simulation/postprocess.test.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/simulation/postprocess.test.js b/src/simulation/postprocess.test.js deleted file mode 100644 index dc77c6a..0000000 --- a/src/simulation/postprocess.test.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -import { world_update } from '../world/world.js'; -import { postprocess } from './postprocess.js'; - -test("agents freeze when finishing on a mutable or active", () => { - const agent = { - id: 1, - net: { compute: () => [[1], null] }, - state: null, - x: 0, y: 0, - flags: {}, - }; - - const lattice = [[{ type: 'empty', flags: {} }]]; - - const world = { - lattice, - lattice_rules: { empty: ()=>{}, active: ()=>{}, mutable: ()=>{} }, - agents: [agent], - senses: [], - actions: [], - validity: [], - }; - - expect(world_update(world, postprocess).agents[0]).toEqual(agent); - world.lattice[0][0].type = 'mutable'; - expect(world_update(world, postprocess).agents[0]).toEqual({ - ...agent, - flags: { frozen: true }, - }); - world.lattice[0][0].type = 'active'; - expect(world_update(world, postprocess).agents[0]).toEqual({ - ...agent, - flags: { frozen: true }, - }); -}); |