diff options
author | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-24 21:14:23 -0500 |
---|---|---|
committer | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-27 14:57:57 -0500 |
commit | 0efff3e59c2c42308fc31bc0d79d01622c9833fd (patch) | |
tree | e85ef9e0416b4fc83de3f02c6f31a0160e267810 /examples | |
parent | 83c956dc71c9fc279eac72ed826f9bd9a36eddc7 (diff) |
fixed jarvis.js
Diffstat (limited to 'examples')
-rw-r--r-- | examples/jarvis.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/jarvis.js b/examples/jarvis.js index 9b428e8..167d0e3 100644 --- a/examples/jarvis.js +++ b/examples/jarvis.js @@ -25,18 +25,18 @@ main.on('open', ()=>{ // Tries to identify itself with a cursor movement } }) -function identity(sender){ - +function identity(send){ + sender = send; // Communicates local send to tileHandler as a global variable console.log('identity activated'); - - var search = new Space(); - search.adhoc('jarvis'); // The search space is the word jarvis, so whenever that's caught, a relevant function can be called. - var read = new Search(search); - var expire = {}; - main.on('tileUpdate', tileHandler); } +var sender; +var search = new Space(); +search.adhoc('jarvis'); // The search space is the word jarvis, so whenever that's caught, a relevant function can be called. +var read = new Search(search); +var expire = {}; + function tileHandler(send, source, tiles){ if (send == sender) return; //this may lead to issues later, but for now is used to count its own updates let locs = tilekeys(tiles); |