From 661847f269030c0cbaa681e2d4697873f891cdec Mon Sep 17 00:00:00 2001 From: sanine Date: Sat, 11 Nov 2023 23:05:12 -0600 Subject: fix team information for empty cells --- src/simulation/lattice_rules.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/simulation/lattice_rules.js') diff --git a/src/simulation/lattice_rules.js b/src/simulation/lattice_rules.js index 80f3221..cc2fc5b 100644 --- a/src/simulation/lattice_rules.js +++ b/src/simulation/lattice_rules.js @@ -1,4 +1,5 @@ import { pairs } from '../util.js'; +import { get_team } from './game.js'; function mod(k, n) { return ((k % n) + n) % n; @@ -34,6 +35,10 @@ export const lattice_rules = { x, y, from: 'empty', to: 'active', flags: { emit: [0, 0, 0, 0, 0, 0, 0, 1] }, }]}; + } else { + return { world_updates: [{ + x, y, flags: { team: get_team(lattice.length, x, y) }, + }]}; } }, -- cgit v1.2.1