Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- math.randomseed(os.time())
- math.random()
- tblHeight = 8
- step = 1
- maxWidth = 80
- strLen = 2
- symPairs = {}
- for i = 1, tblHeight do
- symPairs[i] = {}
- for j = 1, 2 do
- local str = ''
- for k = 1, strLen do
- str = str..string.char(math.random(0x61, 0x7A))
- end
- symPairs[i][j] = str
- end
- end
- for i = 1, tblHeight do
- local line = ''
- local half = math.floor(maxWidth / 2) - strLen
- line = line..string.rep(' ', half - step * i - 1)
- line = line..symPairs[i][1]
- line = line..string.rep(' ', step * i)
- line = line..i
- line = line..string.rep(' ', step * i)
- line = line..symPairs[i][2]
- print(line..'\n')
- end
- io.read()
Advertisement
Add Comment
Please, Sign In to add comment