Модуль:SimpleGenerator
Материал из Поле цифровой дидактики
Для документации этого модуля может быть создана страница Модуль:SimpleGenerator/doc
local p = {}
function p.generateText(frame)
local sentences = {
"the sun was shining brightly.",
"a gentle breeze was blowing.",
"the birds were singing melodiously.",
"the streets were unusually quiet.",
"a cat was lazily lying in the shade.",
"children were playing in the park.",
"someone was humming a tune nearby.",
"clouds started gathering on the horizon.",
"a sudden downpour surprised everyone.",
"the air smelled of fresh rain."
}
math.randomseed(os.time())
local sentence1 = sentences[math.random(#sentences)]
local sentence2 = sentences[math.random(#sentences)]
return "One day... " .. sentence1 .. " " .. sentence2
end
return p