Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- colors = {colors.green, colors.green, colors.lime, colors.lime, colors.yellow, colors.yellow, colors.orange, colors.orange, colors.red, colors.red}
- function drawGraph(gVar, x, y)
- termX, termY = term.getSize()
- if x < 1 then
- x = 1
- elseif x > termX - 2 then
- x = termX - 2
- end
- if y < 10 then
- y = 10
- elseif y > termY then
- y = termY
- end
- if gVar > 10 then
- gVar = 10
- end
- for i = 1, gVar do
- y = y - 1
- term.setCursorPos(x, y)
- term.setBackgroundColor(colors[i])
- term.write(" ")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement