Advertisement
hevohevo

CC: pocket3

Apr 25th, 2016
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. -- pocket3
  2. -- ポケコンのターミナル画面に四角形を描画する
  3.  
  4. -- Functions
  5. function init()
  6.   term.setTextColor(colors.white)
  7.   term.setBackgroundColor(colors.black)
  8.   term.clear()
  9. end
  10.  
  11. function drawPoint(x,y,color)
  12.   term.setBackgroundColor(color)
  13.   term.setCursorPos(x,y)
  14.   term.write(" ")
  15. end
  16.  
  17. -- Main
  18.  
  19. for x=1,26 do
  20.   init()
  21.   drawPoint(x,1,colors.red)
  22.   os.sleep(0.5)
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement