From b71c9d7bf385db039c49e93c7cce63104a7429d4 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 19 Sep 2021 21:29:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8Farithmetic=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=B0=8F=E9=94=AE=E7=9B=98=EF=BC=8C=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E9=83=A8=E5=88=86=E9=A2=98=E7=9B=AE=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_arithmetic.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/parts/scenes/app_arithmetic.lua b/parts/scenes/app_arithmetic.lua index 62230b2b..510de686 100644 --- a/parts/scenes/app_arithmetic.lua +++ b/parts/scenes/app_arithmetic.lua @@ -81,7 +81,7 @@ local levels={ function()-- <%3> local s=rnd(5,17) return s.."%3",s%3 - end,nil,nil,nil, + end,nil,nil, function()-- <%> [,10] local s=rnd(21,62) local a=rnd(3,9) @@ -94,11 +94,11 @@ local levels={ function()-- local a=rnd(9,63) return{COLOR.lR,b8(a)},a - end,nil,nil,nil,nil, + end,nil,nil,nil, function()-- local a=rnd(17,255) return{COLOR.J,b16(a)},a - end,nil,nil,nil,nil, + end,nil,nil, function()-- local s=rnd(9,31) local a=rnd(5,int(s/2)) @@ -108,15 +108,13 @@ local levels={ local s=rnd(18,63) local a=rnd(9,int(s/2)) return{COLOR.lR,b8(a),COLOR.Z,"+",COLOR.lR,b8(s-a)},s - end,nil,nil,nil,nil, + end,nil,nil,nil, function()-- local s=rnd(34,255) local a=rnd(17,int(s/2)) return{COLOR.J,b16(a),COLOR.Z,"+",COLOR.J,b16(s-a)},s - end,nil,nil,nil,nil, - function()-- - return "Coming S∞n"..(rnd()<.5 and""or" "),1e99 - end, + end,nil,nil, + function()return "Coming S∞n"..(rnd()<.5 and""or" "),1e99 end, }setmetatable(levels,{__index=function(self,k)return self[k-1]end}) local level @@ -153,6 +151,7 @@ end function scene.keyDown(key,isRep) if isRep then return end + if key:sub(1,2)=="kp"then key=key:sub(3)end if #key==1 and("0123456789"):find(key)then if #input<8 then input=input..key