SHARE
TWEET

CC: pocket3

hevohevo Apr 25th, 2016 (edited) 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
Top