View difference between Paste ID: LHKP4mvk and 1BQRnBw1
SHOW: | | - or go back to the newest paste.
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 = "\127"
10+
local char = "\143"
11-
local char2 = "\143"
11+
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-
  for i,v in ipairs(wordle) do
24+
	end
25-
    if  i <= attempt then
25+
26-
      printer.setCursorPos(9,8+i)
26+
27-
      printer.write(char2.." "..char2.." "..char2.." "..char2.." "..char2)
27+
28-
    end
28+
29-
  end  
29+
30-
  --printer.write(char2.." "..char2.." "..char2.." "..char2.." "..char2)
30+
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