Susceptance

control_start

Jun 18th, 2022 (edited)
464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. nodeAmount = 4
  2.  
  3. function DrawBackground()
  4.     term.setCursorPos(1,1)
  5.     term.setBackgroundColor(1)
  6.     term.setTextColor(32768)
  7.     term.clear()
  8.  
  9.     sX, sY = term.getSize()
  10.  
  11.     node = {}
  12.     for i=1, nodeAmount do
  13.         x = math.random(1, sX)
  14.         y = math.random(1, sY)
  15.  
  16.         table.insert(node, {x,y})
  17.     end
  18.  
  19.     for i=1, nodeAmount do
  20.         x = node[i][1]
  21.         y = node[i][2]
  22.  
  23.         for i=1, nodeAmount do
  24.             tx = node[i][1]
  25.             ty = node[i][2]
  26.             paintutils.drawLine(x,y, tx,ty, 32768)
  27.         end
  28.     end
  29. end
  30.  
  31. DrawBackground()
  32.  
  33. function UpdateTerm()
  34.  
  35. end
  36.  
  37. parallel.waitForAll(UpdateTerm)
Add Comment
Please, Sign In to add comment