Advertisement
Padilk

Untitled

Aug 21st, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. m = peripheral.wrap( "right" )
  2. m.setTextScale(2)
  3. x,y = m.getSize()
  4.  
  5. m.clear()
  6.  
  7. direction = 0
  8.  
  9. --H H H /\
  10. --H H H \/
  11.  
  12. floors = {}
  13. for i=1,6 do
  14. floors[i]=0
  15. end
  16.  
  17. floorsCount=5
  18. currentFloor=3
  19.  
  20. function redraw()
  21. m.setBackgroundColor(colors.black)
  22. m.clear()
  23. cf = 1
  24. for j=1,2 do
  25. for i=1,5 do
  26. m.setCursorPos(i,j)
  27. if i%2 == 0 and cf<=floorsCount then
  28. m.setBackgroundColor(colors.green)
  29. m.write(cf)
  30. cf = cf+1
  31. else
  32. m.setBackgroundColor(colors.lightGray)
  33. m.write(" ")
  34. end
  35. end
  36. for i=1,floorsCount do
  37. m.setCursorPos(2*(1+(i-1)%3)-1,(i/3)+1)
  38. m.setBackgroundColor(colors.green)
  39. m.write(i)
  40. end
  41. end
  42. end
  43.  
  44.  
  45. c=1
  46.  
  47. --[[for i=1,x do
  48. for j=1,y do
  49. m.setBackgroundColor(c)
  50. m.setCursorPos(i,j)
  51. m.write(j)
  52. c=c*2
  53. if c>33000 then c=1 end
  54. end
  55. end--]]
  56.  
  57. redraw()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement