Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do
- -- [[ Settings ]] --
- local height = 40
- local offset = 1650
- -- [[ Main ]] --
- local list = {{1},{1, 1}}
- --[[
- i
- {1} 1
- {1,1} 2
- {1,2,1} 3
- {1,3,3,1} 4
- {1,4,6,4,1} 5
- ... ...
- --]]
- if height > 2 then
- for i=3, height do
- table.insert(list, {})
- for length=1, i do
- local add = ( list[i-1][length-1] or 0 ) + ( list[i-1][length] or 0 )
- table.insert(list[i], add)
- print( ( list[i-1][length-1] or 0 ) .. "+" .. ( list[i-1][length] or 0 ))
- end
- end
- end
- for i=1, height do
- local left = height * 50 - i*25
- for length=1, i do
- ui.addTextArea(i*100+length, list[i][length], nil, length*50+left - offset, i*10, 0, 0, 0, 0)
- end
- end
- -- [[ End ]] --
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement