Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap( "right" )
- m.setTextScale(2)
- x,y = m.getSize()
- m.clear()
- direction = 0
- --H H H /\
- --H H H \/
- floors = {}
- for i=1,6 do
- floors[i]=0
- end
- floorsCount=5
- currentFloor=3
- function redraw()
- m.setBackgroundColor(colors.black)
- m.clear()
- cf = 1
- for j=1,2 do
- for i=1,5 do
- m.setCursorPos(i,j)
- if i%2 == 0 and cf<=floorsCount then
- m.setBackgroundColor(colors.green)
- m.write(cf)
- cf = cf+1
- else
- m.setBackgroundColor(colors.lightGray)
- m.write(" ")
- end
- end
- for i=1,floorsCount do
- m.setCursorPos(2*(1+(i-1)%3)-1,(i/3)+1)
- m.setBackgroundColor(colors.green)
- m.write(i)
- end
- end
- end
- c=1
- --[[for i=1,x do
- for j=1,y do
- m.setBackgroundColor(c)
- m.setCursorPos(i,j)
- m.write(j)
- c=c*2
- if c>33000 then c=1 end
- end
- end--]]
- redraw()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement