A2XVLUAMR66SVIIYLEV6KQOCFW2BS5Y3C6H5GOUCXLABPYEYOE4AC
on.mouse_press = function(x,y, mouse_button)
if x >= X and x < X+Square_side and y >= Y and y < Y+Square_side then
Cursor = {1, 1}
elseif x >= X+Square_side and x < X+Square_side*2 and y >= Y and y < Y+Square_side then
Cursor = {2, 1}
elseif x >= X and x < X+Square_side and y >= Y+Square_side and y < Y+Square_side*2 then
Cursor = {1, 2}
elseif x >= X+Square_side and x < X+Square_side*2 and y >= Y+Square_side and y < Y+Square_side*2 then
Cursor = {2, 2}
else
Cursor = {0, 0} -- invalid
end
end
Y = 200
X = 250
Cursor = {0, 0} -- x, y coordinate
elseif chord:match('%d') then
-- cursor visible
local x,y = Cursor[1], Cursor[2]
if x > 0 and y > 0 then
-- it's not in the provided square
if x ~= Problem.x or y ~= Problem.y then
local c = Problem.data[y][x]
local d = (string.byte(chord) - 48)
if c == '' then
Problem.data[y][x] = d
elseif c < 2 then -- not overfull
Problem.data[y][x] = Problem.data[y][x]*10 + d
end
end
end