整理代码
This commit is contained in:
@@ -8,6 +8,10 @@ function MATH.sign(a)
|
||||
return a>0 and 1 or a<0 and -1 or 0
|
||||
end
|
||||
|
||||
function MATH.roll(chance)
|
||||
return rnd()<(chance or .5)
|
||||
end
|
||||
|
||||
function MATH.coin(a,b)
|
||||
if rnd()<.5 then
|
||||
return a
|
||||
|
||||
@@ -90,7 +90,7 @@ local function newTile()
|
||||
if nextCD>0 then
|
||||
nextTile=1
|
||||
else
|
||||
nextTile=rnd()>.1 and 2 or rnd()>.1 and 3 or 4
|
||||
nextTile=MATH.roll(.9)and 2 or MATH.roll(.9)and 3 or 4
|
||||
nextCD=rnd(8,12)
|
||||
end
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ end
|
||||
|
||||
local function start()
|
||||
state=1
|
||||
vx=rnd()>.5 and 6 or -6
|
||||
vx=MATH.coin(6,-6)
|
||||
vy=rnd()*6-3
|
||||
end
|
||||
function scene.keyDown(key,isRep)
|
||||
|
||||
@@ -29,10 +29,10 @@ local typeColor={
|
||||
english=COLOR.B,
|
||||
name=COLOR.lV,
|
||||
}
|
||||
local function _filter(word)
|
||||
local word_org=word
|
||||
if FNSF then word=word:gsub("[Pp]atreon",CHAR.zChan.spark)end
|
||||
local function _filter(word_org)
|
||||
local word=word_org
|
||||
word=word:gsub("[Tt]etris",CHAR.zChan.thinking)
|
||||
if FNSF then word=word:gsub("[Pp]atreon",CHAR.zChan.qualified)end
|
||||
return word,word_org
|
||||
end
|
||||
local function _scanDict(D)
|
||||
|
||||
Reference in New Issue
Block a user