玩家的随机数生成器独立为四个,尝试避免联网对战时不同步错误,整理代码

This commit is contained in:
MrZ626
2021-05-13 02:34:32 +08:00
parent adbb888fe4
commit cc1261c285
25 changed files with 82 additions and 77 deletions

View File

@@ -45,17 +45,17 @@ return{
end
end
for _=1,5 do
P.field[i][P:RND(10)]=0
P.field[i][P.holeRND:random(10)]=0
end
else
P.field[i]=FREEROW.get(0)
P.visTime[i]=FREEROW.get(30)
for j=1,10 do
if P:RND()>.9 then
if P.holeRND:random()>.9 then
P.field[i][j]=math.random(16)
end
end
P.field[i][P:RND(10)]=0
P.field[i][P.holeRND:random(10)]=0
end
P.field[i].garbage=true
end