summaryrefslogtreecommitdiff
path: root/beescroll.lua
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-04-02 02:48:42 +0100
committerubq323 <ubq323@ubq323.website>2024-04-02 02:48:42 +0100
commitff712cedfc79ae835672f1e26e229e5fa60d0aae (patch)
tree1a825495231d3513e214da22ae223381fbc4401a /beescroll.lua
parentf1b01807622f07f122307f78916070674a21387f (diff)
launch beescroll
Diffstat (limited to 'beescroll.lua')
-rw-r--r--beescroll.lua36
1 files changed, 33 insertions, 3 deletions
diff --git a/beescroll.lua b/beescroll.lua
index 3384c58..fe0ac86 100644
--- a/beescroll.lua
+++ b/beescroll.lua
@@ -2,6 +2,14 @@ local m = peripheral.find"monitor"
local W,H = m.getSize()
+local cities = {}
+local fp = assert(fs.open("/cities.txt","r"))
+repeat
+ local line = fp.readLine()
+ table.isert(cities,line)
+until not line
+fp.close()
+
local verbs = {
"recovered",
"extinguished",
@@ -30,14 +38,36 @@ local verbs = {
"redeployed",
"shaken",
"stirred",
+ "discovered",
+ "defeated",
+ "thwarted",
+ "confounded",
+ "separated",
+ "dissected",
+ "submerged",
+ "extracted",
+ "zereod",
+ "reset",
+ "hidden",
+ "concealed",
+ "remade",
+ "detected",
+ "skolemized",
+ "reinterpreted",
+ "unfazed",
}
-
+
+local function choice(list)
+ return list[math.random(#list)]
+end
while true do
- local x = math.random(0,999999)
+ local x = math.random(0,99999)
m.scroll(1)
m.setCursorPos(1,H)
- m.write(string.format("%6d",x))
+ m.write(("%5d bees have been %s in %s."):format(
+ x, choice(verbs), choice(cities)
+ )
os.sleep(1)
end