summaryrefslogtreecommitdiff
path: root/src/simulation/senses.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/senses.js')
-rw-r--r--src/simulation/senses.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/simulation/senses.js b/src/simulation/senses.js
index 23775b6..ca07442 100644
--- a/src/simulation/senses.js
+++ b/src/simulation/senses.js
@@ -157,7 +157,7 @@ const see = {
const [x, y] = vision_idx_to_world_pos(world, agent, idx);
return see_cell(world, x, y);
});
- return world.agents.reduce(
+ const result = world.agents.reduce(
(acc, a) => {
const idx = world_pos_to_vision_idx(world, agent, a.x, a.y);
if (idx < 0 || idx > VIS_WIDTH*VIS_HEIGHT) {
@@ -169,6 +169,7 @@ const see = {
},
vision
);
+ return result;
},
};