A little sudoku-like app for helping first-graders practice addition
generate = function()
	local g = {
		col_totals = {'', ''},
		row_totals = {'', ''},
		data = {
			{'', ''},
			{'', ''},
		},
	}
	Solution = g
	g.data[1][1] = math.random(1,9)
--	loiter()
	local d11 = g.data[1][1]
	g.row_totals[1] = math.random(d11+1,10)
	g.col_totals[1] = math.random(d11+1,10)
--	loiter()
	g.data[1][2] = g.row_totals[1] - d11
	g.data[2][1] = g.col_totals[1] - d11
--	loiter()
	local max = math.max(g.data[1][2], g.data[2][1])
	g.data[2][2] = math.random(1, 10-max)
--	loiter()
	g.col_totals[2] = g.data[1][2] + g.data[2][2]
	g.row_totals[2] = g.data[2][1] + g.data[2][2]
end