HVO2GCUOHSC6ZILSEEFY57KYQU4QQIMO5JF3HM32SOC4CYJWQI5QC check_status = function()for y=1,2 dofor x=1,2 doif Problem.data[y][x] == '' thenreturn ''elseif Problem.data[y][x] ~= Solution.data[y][x] thenreturn 'no'endendendreturn 'yes'end
draw_status = function()local w = App.width('check')local x = Safe_width-w-20local y = 50+love.graphics.getFont():getHeight()+150button(Buttons, 'check', {x=x, y=y, w=w+10, h=love.graphics.getFont():getHeight()+10, bg={r=0.6, g=0.8, b=0.6},icon = function(p)App.color{r=0, g=0, b=0}love.graphics.print('check', p.x+5, p.y+5)end,onpress1 = function()Status = check_status()end,})x = Safe_width-260y = y+120love.graphics.rectangle('line', x,y, 250,love.graphics.getFont():getHeight()+20)if Status == 'yes' thenApp.color{r=0, g=0.6, b=0}love.graphics.print('yes!', x+10, y+10)elseif Status == 'no' thenApp.color{r=1, g=0, b=0}love.graphics.print('sorry', x+10, y+10)endend
draw_next_button = function()local w = App.width('next')button(Buttons, 'next', {x=Safe_width-w-20, y=50, w=w+10, h=love.graphics.getFont():getHeight()+10, bg={r=0.6, g=0.8, b=0.6},icon = function(p)App.color{r=0, g=0, b=0}love.graphics.print('next', p.x+5, p.y+5)end,onpress1 = function()animate(new)end,})end
-- Is the answer correct?Status = '' -- incomplete. Can also be 'yes' or 'no'
local w = App.width('next')button(Buttons, 'next', {x=Safe_width-w-20, y=50, w=w+10, h=love.graphics.getFont():getHeight()+10, bg={r=0.6, g=0.8, b=0.6},icon = function(p)App.color{r=0, g=0, b=0}love.graphics.print('next', p.x+5, p.y+5)end,onpress1 = function()animate(new)end,})
draw_next_button()draw_status()