diff options
Diffstat (limited to 'src/simulation/lattice_rules.js')
-rw-r--r-- | src/simulation/lattice_rules.js | 5 |
1 files changed, 5 insertions, 0 deletions
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) }, + }]}; } }, |