Advertisement
UtkaRobert303

Dyck

Mar 17th, 2024
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | Gaming | 0 0
  1. function iff (x,y)
  2. if a[x][y]==1 then
  3. turtle.select(1)
  4. elseif a[x][y]==2 then
  5. turtle.select(2)
  6. elseif a[x][y]==3 then
  7. turtle.select(3)
  8. elseif a[x][y]==4 then
  9. turtle.select(4)
  10. elseif a[x][y]==5 then
  11. turtle.select(5)
  12. elseif a[x][y]==6 then
  13. turtle.select(6)
  14. end
  15. end
  16.  
  17. a={{1,1,1,1,1,1,1,2,2,2,2,1,1,1,1} ,
  18.    {1,1,1,1,1,1,2,3,3,3,3,2,1,1,1} ,
  19.    {1,1,1,1,1,2,3,3,3,3,3,3,2,1,1} ,
  20.    {1,1,1,1,2,3,3,3,3,2,3,4,2,2,1} ,
  21.    {1,2,1,1,1,2,3,3,3,3,3,4,4,4,2} ,
  22.    {2,3,2,1,2,2,2,3,3,3,4,4,4,2,2} ,
  23.    {2,3,3,2,3,3,3,3,3,3,3,2,2,1,1} ,
  24.    {2,3,3,3,3,3,3,3,3,3,3,3,2,1,1} ,
  25.    {1,2,3,3,5,3,3,3,3,3,3,3,3,2,1} ,
  26.    {1,2,3,3,3,5,3,3,3,5,3,3,3,2,1} ,
  27.    {1,1,2,3,3,3,5,5,5,3,3,3,2,1,1} ,
  28.    {1,1,1,2,3,3,3,3,3,3,3,2,1,1,1} ,
  29.    {1,1,1,1,2,3,3,3,3,3,2,1,1,1,1}}
  30.  
  31.  
  32. turtle.up()
  33. for x=1,10 do
  34. for y = 1,11 do
  35. iff(x,y)
  36. turtle.placeDown()
  37. turtle.forward()
  38. end
  39. turtle.turnRight()
  40. turtle.forward()
  41. turtle.turnRight()
  42. for y = 1,11 do
  43. turtle.forward()
  44. end
  45. turtle.turnRight()
  46. turtle.turnRight()
  47. end
Tags: RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement