Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ypos = {}
- maxY = 3
- cy = 0
- function doStuff(xx)
- for ymax = 1, maxY do
- if turtle.detectDown() then
- ypos[xx] = {cy, cy, cy}
- for cy = cy, 0 do
- turtle.up()
- cy = cy +1
- if cy == 0 then
- turtle.forward()
- cy = cy -1
- end
- end
- else
- turtle.down()
- cy = cy -1
- end
- end
- end
- function getColour(int)
- if int <= -5 then return colors.blue end
- if int == -4 then return colors.purple end
- if int == -3 then return colors.magenta end
- if int == -2 then return colors.cyan end
- if int == -1 then return colors.lightBlue end
- if int == 0 then return colors.pink end
- if int == 1 then return colors.yellow end
- if int == 2 then return colors.lime end
- if int == 3 then return colors.green end
- if int == 4 then return colors.brown end
- if int >= 5 then return colors.red end
- return colors.green
- end
- term.clear()
- term.setCursorPos(0,0)
- for xx = 1, 3 do
- doStuff(xx)
- end
- for xx = 1, 3 do
- for zz = 1, 3 do
- term.setBackgroundColor(getColour(ypos[xx][zz]))
- term.setCursorPos(xx,zz)
- print (" ")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement