From 428062dccb362627b4251945632c75d9db8f93f7 Mon Sep 17 00:00:00 2001 From: sanine Date: Fri, 10 Nov 2023 11:24:56 -0600 Subject: refactor senses to use world instead of lattice only --- src/world/sense.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/world/sense.js') diff --git a/src/world/sense.js b/src/world/sense.js index 47329b7..9b5c7d4 100644 --- a/src/world/sense.js +++ b/src/world/sense.js @@ -8,10 +8,10 @@ */ -export function sense_read(lattice, agent, sense) { - const result = sense.read(lattice, agent); +export function sense_read(world, agent, sense) { + const result = sense.read(world, agent); if (result.length !== sense.size) { throw new Error(`Expected result of size ${sense.size}, but got ${result.length} instead.`); } - return sense.read(lattice, agent); + return result; } -- cgit v1.2.1