clear a cell on backspace rather than show '0'

Thanks Ravi for the idea.
This commit is contained in:
Kartik K. Agaram 2023-11-16 21:14:02 -08:00
parent aecb248626
commit 53af8fb518
1 changed files with 4 additions and 1 deletions

View File

@ -29,8 +29,11 @@ print(chord)
-- it's not in the provided square
if x ~= Problem.x or y ~= Problem.y then
local c = Problem.data[y][x]
if c ~= '' and c > 0 then
if c ~= '' then
Problem.data[y][x] = math.floor(c/10)
if Problem.data[y][x] == 0 then
Problem.data[y][x] = ''
end
end
end
end