chopstyix

Untitled

Feb 11th, 2022 (edited)
582
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local wordle = {
  2. [1] = {256,256,256,16,256},
  3. [2] = {256,256,16,16,256},
  4. [3] = {256,16,16,256,256},
  5. [4] = {8192,256,256,256,8192},
  6. [5] = {8192,8192,8192,8192,8192},
  7. [6] = {}
  8. }
  9. local player = "Chopstyix"
  10. local char = "\143"
  11. local attempt = 5
  12. local printer = peripheral.wrap("right")
  13.  
  14. --# Functions
  15. function printColor(_color)
  16.   for k,v in pairs(wordle) do
  17.     printer.setCursorPos(8,7+k)
  18.     for _k,_v in ipairs(k) do
  19.       if _v == _color then
  20.         printer.write(char2)
  21.         local _x, _y = printer.getCursorPos()
  22.         printer.setCursorPos(_x+_k,_y)
  23.       end
  24.     end
  25. end
  26.  
  27. -- 25
  28. if printer.newPage() then
  29.   --printer.setCursorPos(9,1)
  30.   printer.setCursorPos(1,2)
  31.   printer.write(player)
  32.   printer.setCursorPos(1,3)
  33.   printer.write("Wordle #69")
  34.   printColor(colors.green)
  35.   -- for i,v in ipairs(wordle) do
  36.     -- if  i <= attempt then
  37.       -- printer.setCursorPos(9,8+i)
  38.       -- printer.write(char2.." "..char2.." "..char2.." "..char2.." "..char2)
  39.     -- end
  40.   -- end  
  41.   -- --printer.write(char2.." "..char2.." "..char2.." "..char2.." "..char2)
  42.   printer.setPageTitle("Wordle #69")
  43.   printer.endPage()
  44. else
  45.   error("Cannot be created")
  46. end
  47.  
  48.  
  49.  
Add Comment
Please, Sign In to add comment