Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local gpu = component.gpu
- local term = require("term")
- local w,h = gpu.getResolution()
- function printInfo()
- term.clear()
- gpu.setBackground(0xFFFFFF)
- local info = {
- "XX XXXX XXXXX XXXXX",
- "XX X X X X X",
- "XX XXXX X X XXXXX",
- "XX X X X X X",
- "XXXXX XXXX XXXX X X"
- }
- local index = {}
- index[1] = w/3
- index[2] = h/3
- for k,v in pairs(info) do
- for i = 1, string.len(v) do
- local curr = string.sub(v, i, i)
- if (curr == "X") then
- gpu.fill(index[1],index[2],1,1," ")
- end
- index[1] = index[1] + 1
- end
- index[2] = index[2] + 1
- index[1] = w/3
- end
- end
- printInfo()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement