Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local col={0,0,0,0}
- local row= {0,0,0,0}
- local row1= {0,0,0,0}
- local row2= {0,0,0,0}
- local row3= {0,0,0,0}
- local row4= {0,0,0,0}
- local function checkrow(txt,n,tabled)
- for count =1,9,1 do
- nq, n = string.gsub(txt,tostring(count),"#")
- if n>=2 then return false end
- end
- local sum=0
- for _, v in pairs(tabled) do
- if tonumber(v) then
- sum = sum+v
- end
- end
- if sum == n then return true end
- return false
- end
- while true do
- if checkrow(table.concat(row1),row[1],row1)== false then goto continue end
- if checkrow(table.concat(row2),row[2],row2)== false then goto continue end
- if checkrow(table.concat(row3),row[3],row3)== false then goto continue end
- if checkrow(table.concat(row4),row[4],row4)== false then goto continue end
- ::continue::
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement