diff options
Diffstat (limited to 'beescroll.lua')
-rw-r--r-- | beescroll.lua | 104 |
1 files changed, 12 insertions, 92 deletions
diff --git a/beescroll.lua b/beescroll.lua index fcb9d3b..0732400 100644 --- a/beescroll.lua +++ b/beescroll.lua @@ -3,99 +3,19 @@ m.setTextScale(0.5) local W,H = m.getSize() -local cities = {} -local fp = assert(fs.open("/cities.txt","r")) -repeat - local line = fp.readLine() - table.insert(cities,line) -until not line -fp.close() +local function read_lines(fname) + local out = {} + local fp = assert(fs.open(fname,"r")) + repeat + local line = fp.readLine() + table.insert(out, line) + until not line + fp.close() + return out +end -local verbs = { - "recovered", - "extinguished", - "exsanguinated", - "defenestrated", - "obtained", - "recovered", - "mistreated", - "relocated", - "enraptured", - "found", - "seen", - "heard", - "devestated", - "trusted", - "distrusted", - "promoted", - "extended", - "stretched", - "squished", - "moved", - "rotated", - "frozen", - "unfrozen", - "deployed", - "redeployed", - "shaken", - "stirred", - "discovered", - "defeated", - "thwarted", - "confounded", - "separated", - "dissected", - "submerged", - "extracted", - "zereod", - "reset", - "hidden", - "concealed", - "remade", - "detected", - "skolemized", - "reinterpreted", - "unfazed", - "bifurcated", - "sighted", - "configured", - "powdered", - "melted", - "solidified", - "electrified", - "ionized", - "oxidized", - "reacted", - "propelled", - "tetrated", - "multiplied", - "exponentiated", - "prepared", - "eradicated", - "armored", - "armoured", - "vitrified", - "corroded", - "apified", - "unmade", - "darkened", - "trepanated", - "titrated", - "fluoresced", - "illuminated", - "filtered", - "refracted", - "enchanted", - "conjured", - "crystalized", - "vibrated", - "resonated", - "ythundered", - "displaced", - "forgotten", - "accepted", - "disputed", -} +local cities = read_lines("/cities.txt") +local verbs = read_lines("/verbs.txt") local function choice(list) return list[math.random(#list)] |