From 914def7b5f844295deb0a08a219479973e2eff99 Mon Sep 17 00:00:00 2001 From: Nick Walton Date: Mon, 1 Jun 2020 17:05:22 -0600 Subject: [PATCH] Delete world.js --- world.js | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 world.js diff --git a/world.js b/world.js deleted file mode 100644 index 8871a35..0000000 --- a/world.js +++ /dev/null @@ -1,25 +0,0 @@ -const world = { - 'orc': 'Orcs have been mistreated for many years in the kingdom of Larion. Treated as second class citizens they are often denied jobs and treated as criminals. There is a movement called the Human Orc Friendship Association (HOFA) that seeks equality between humans and orcs.', - 'hofa': 'HOFA (the Human Orc Friendship Association) is a group dedicated to seeking equality between orcs and humans', - 'human': 'Many humans hate orcs, but there are also a large number of humans who believe orcs have been greatly mistreated and deserve equal rights.', - 'king': 'The king of Larion doesn\'t hate orcs necessarily, but he\'s hesitant to upset the balance of the kingdom by increasing their rights.', - 'queen': 'The queen feels fondness towards orcs and has a soft place in her heart for them.', - 'zeradell': 'Zeradell is the capital of Lario and is where the King and Queen live.' -} - -const worldContext = (relevant) => { - const lower = relevant.toLowerCase() - let context = '' - - for(key in world){ - if(lower.includes(key)){ - context = context + world[key] + '\n' - } - } - return context -} - -const modifier = () => { - - const lastOutput = history?.length > 0 ? history[history.length-1] : '' - const context = worldContext(lastOutput + '\n' + text)