Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("top")
- mon.setBackgroundColor(colors.black)
- mon.clear()
- function BoxL (xmin,xmax,ymin,ymax,rows,color1,color2)
- local currColor = color1
- for k = 0,rows do
- if currColor == color1 then
- currColor = color2
- mon.setBackgroundColor(currColor)
- else
- currColor = color1
- mon.setBackgroundColor(currColor)
- end
- for i = xmin,xmax do
- for j = ymin,ymax do
- mon.setCursorPos(i,j)
- mon.write(" ")
- end
- i = i + 1
- end
- k = k + 1
- mon.setBackgroundColor(colors.black)
- end
- end
- BoxL(1,20,1,2,2,colors.red,colors.blue)
Advertisement
Add Comment
Please, Sign In to add comment