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 == 1 and cf<=floorsCount then
- if cf==currentFloor then
- m.setBackgroundColor(700)
- else
- m.setBackgroundColor(colors.lightGray)
- end
- m.write(cf)
- cf = cf+1
- else
- m.setBackgroundColor(colors.black)
- m.write(" ")
- end
- end
- end
- end
- c=1
- redraw()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement