Advertisement
x8-bitx

VisualMapTemplate

Dec 6th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1. --Visual Layout
  2. vlayout = {
  3.   {"[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]"},
  4.   {"[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]"},
  5.   {"[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]"},
  6.   {"[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]"},
  7.   {"[ ]","[ ]","[ ]","[ ]","[X]","[X]","[ ]","[ ]","[ ]","[ ]"},
  8.   {"[ ]","[ ]","[ ]","[ ]","[X]","[X]","[ ]","[ ]","[ ]","[ ]"},
  9.   {"[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]"},
  10.   {"[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]"},
  11.   {"[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]"},
  12.   {"[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]"}
  13. }
  14.  
  15. function drawMap(tposR, tposC)
  16.   vlayout[tposR][tposC] = "[@]"
  17.   for k,v in pairs(vlayout) do
  18.     for s,j in pairs(vlayout[k]) do
  19.       write(j)
  20.     end
  21.     write("\n")
  22.   end
  23. end
  24.  
  25. drawMap(1,2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement