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.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/simulation/senses.js b/src/simulation/senses.js
new file mode 100644
index 0000000..4fc96d6
--- /dev/null
+++ b/src/simulation/senses.js
@@ -0,0 +1,18 @@
+'use strict';
+
+
+const frozen = {
+ size: 1,
+ read: (lattice, agent) => {
+ if (agent.flags.frozen === true) {
+ return [ 1 ];
+ } else {
+ return [ 0 ];
+ }
+ },
+};
+
+
+export const senses = [
+ frozen,
+];