整理代码,微调TRS中PQT5J5L5的踢墙表

This commit is contained in:
MrZ626
2021-04-15 00:40:49 +08:00
parent ee28bacf0c
commit 6c44808c19

View File

@@ -1,14 +1,15 @@
local noKick,noKick_180,pushZero do local map={}for x=-4,4 do map[x]={}for y=-4,4 do map[x][y]={x,y}end end
local zero={0,0}
local Zero={zero} local noKickSet,noKickSet_180,pushZero do
noKick={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero} local Zero={map[0][0]}
noKick_180={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero,[02]=Zero,[20]=Zero,[13]=Zero,[31]=Zero} noKickSet={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero}
noKickSet_180={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero,[02]=Zero,[20]=Zero,[13]=Zero,[31]=Zero}
function pushZero(t) function pushZero(t)
for _,L in next,t do for _,L in next,t do
if type(L)=="table"then if type(L)=="table"then
for _,v in next,L do for _,v in next,L do
if not v[1]or v[1][1]~=0 or v[1][2]~=0 then if not v[1]or v[1][1]~=0 or v[1][2]~=0 then
table.insert(v,1,zero) table.insert(v,1,map[0][0])
end end
end end
end end
@@ -16,33 +17,40 @@ local noKick,noKick_180,pushZero do
end end
end end
local collect do --Convert vector string to table
local map={} local function vecStrConv(list)
for x=-3,3 do map[x]={}for y=-3,3 do map[x][y]={x,y}end end for k,vecStr in next,list do
function collect(T)--Make all vec point to the same vec list[k]=map[tonumber(vecStr:sub(1,2))][tonumber(vecStr:sub(3,4))]
if type(T)=="table"then end
for _,t in next,T do end
for k,vec in next,t do
t[k]=map[vec[1]][vec[2]] --Make all vec point to the same vec
end local function collectSet(set)
end if type(set)~="table"then return end
for _,list in next,set do
if type(list[1])=="string"then
vecStrConv(list)
end end
end end
end end
local function C_sym(L)--Use this if the block is centrosymmetry, *PTR!!! --Use this if the block is centrosymmetry, *PTR!!!
local function centroSymSet(L)
L[23]=L[01]L[32]=L[10] L[23]=L[01]L[32]=L[10]
L[21]=L[03]L[12]=L[30] L[21]=L[03]L[12]=L[30]
L[20]=L[02]L[31]=L[13] L[20]=L[02]L[31]=L[13]
end end
local function flipList(O)--Use this to copy a symmetry list
--Use this to copy a symmetry set
local function flipList(O)
if not O then return end if not O then return end
local L={} local L={}
for i=1,#O do for i,s in next,O do
L[i]={-O[i][1],O[i][2]} L[i]=string.char(88-s:byte())..s:sub(2)
end end
return L return L
end end
local function reflect(a) local function reflect(a)
local b={} local b={}
b[03]=flipList(a[01]) b[03]=flipList(a[01])
@@ -80,48 +88,48 @@ do
} }
TRS={ TRS={
{ {
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1, 2},{ 0, 1}}, [01]={"-1+0","-1+1","+0-2","-1+2","+0+1"},
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1,-2},{ 1,-2}}, [10]={"+1+0","+1-1","+0+2","+1-2","+1-2"},
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-1},{ 1,-2}}, [03]={"+1+0","+1+1","+0-2","+1-1","+1-2"},
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0,-1}}, [30]={"-1+0","-1-1","+0+2","-1+2","+0-1"},
[12]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2}}, [12]={"+1+0","+1-1","+0+2","+1+2"},
[21]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2}}, [21]={"-1+0","-1+1","+0-2","-1-2"},
[32]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2}}, [32]={"-1+0","-1-1","+0+2","-1+2"},
[23]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2}}, [23]={"+1+0","+1+1","+0-2","+1-2"},
[02]={{ 1, 0},{-1, 0},{ 0,-1},{ 0, 1}}, [02]={"+1+0","-1+0","+0-1","+0+1"},
[20]={{-1, 0},{ 1, 0},{ 0, 1},{ 0,-1}}, [20]={"-1+0","+1+0","+0+1","+0-1"},
[13]={{ 0,-1},{ 0, 1},{-1, 0},{ 0,-2}}, [13]={"+0-1","+0+1","+0-2"},
[31]={{ 0, 1},{ 0,-1},{ 1, 0}}, [31]={"+0+1","+0-1","+0+2"},
},--Z },--Z
false,--S false,--S
{ {
[01]={{-1, 0},{-1, 1},{ 1, 0},{ 0,-2},{ 1, 1}}, [01]={"-1+0","-1+1","+1+0","+0-2","+1+1"},
[10]={{ 1, 0},{ 1,-1},{-1, 0},{ 0, 2},{ 1, 2}}, [10]={"+1+0","+1-1","-1+0","+0+2","+1+2"},
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{ 1,-1},{ 0, 1}}, [03]={"+1+0","+1+1","+0-2","+1-2","+1-1","+0+1"},
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0,-1},{-1, 1}}, [30]={"-1+0","-1-1","+0+2","-1+2","+0-1","-1+1"},
[12]={{ 1, 0},{ 1,-1},{ 1, 1},{-1, 0},{ 0,-1},{ 0, 2},{ 1, 2}}, [12]={"+1+0","+1-1","+1+1","-1+0","+0-1","+0+2","+1+2"},
[21]={{-1, 0},{-1, 1},{-1,-1},{ 1, 0},{ 0, 1},{ 0,-2},{-1,-2}}, [21]={"-1+0","-1+1","-1-1","+1+0","+0+1","+0-2","-1-2"},
[32]={{-1, 0},{-1,-1},{ 1, 0},{ 0, 2},{-1, 2},{-1, 1}}, [32]={"-1+0","-1-1","+1+0","+0+2","-1+2","-1+1"},
[23]={{ 1, 0},{ 1,-1},{-1, 0},{ 1, 1},{ 0,-2},{ 1,-2}}, [23]={"+1+0","+1-1","-1+0","+1+1","+0-2","+1-2"},
[02]={{-1, 0},{ 1, 0},{ 0,-1},{ 0, 1}}, [02]={"-1+0","+1+0","+0-1","+0+1"},
[20]={{ 1, 0},{-1, 0},{ 0, 1},{ 0,-1}}, [20]={"+1+0","-1+0","+0+1","+0-1"},
[13]={{ 0,-1},{ 0, 1},{ 1, 0}}, [13]={"+0-1","+0+1","+1+0"},
[31]={{ 0, 1},{ 0,-1},{-1, 0}}, [31]={"+0+1","+0-1","-1+0"},
},--J },--J
false,--L false,--L
{ {
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{ 0, 1}}, [01]={"-1+0","-1+1","+0-2","-1-2","+0+1"},
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2},{ 0,-1}}, [10]={"+1+0","+1-1","+0+2","+1+2","+0-1"},
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{ 0, 1}}, [03]={"+1+0","+1+1","+0-2","+1-2","+0+1"},
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0,-1}}, [30]={"-1+0","-1-1","+0+2","-1+2","+0-1"},
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{-1,-1},{ 0, 2},{ 1, 2}}, [12]={"+1+0","+1-1","+0-1","-1-1","+0+2","+1+2"},
[21]={{-1, 0},{ 0,-2},{-1,-2},{ 1, 1}}, [21]={"-1+0","+0-2","-1-2","+1+1"},
[32]={{-1, 0},{-1,-1},{ 0,-1},{ 1,-1},{ 0, 2},{-1, 2}}, [32]={"-1+0","-1-1","+0-1","+1-1","+0+2","-1+2"},
[23]={{ 1, 0},{ 0,-2},{ 1,-2},{-1, 1}}, [23]={"+1+0","+0-2","+1-2","-1+1"},
[02]={{-1, 0},{ 1, 0},{ 0, 1}}, [02]={"-1+0","+1+0","+0+1"},
[20]={{ 1, 0},{-1, 0},{ 0,-1}}, [20]={"+1+0","-1+0","+0-1"},
[13]={{ 0,-1},{ 0, 1},{ 1, 0},{ 0,-2},{ 0, 2}}, [13]={"+0-1","+0+1","+1+0","+0-2","+0+2"},
[31]={{ 0,-1},{ 0, 1},{-1, 0},{ 0,-2},{ 0, 2}}, [31]={"+0-1","+0+1","-1+0","+0-2","+0+2"},
},--T },--T
function(P,d) function(P,d)
if P.gameEnv.easyFresh then if P.gameEnv.easyFresh then
@@ -162,111 +170,111 @@ do
end end
end,--O end,--O
{ {
[01]={{ 0, 1},{ 1, 0},{-2, 0},{-2,-1},{ 1, 2}}, [01]={"+0+1","+1+0","-2+0","-2-1","+1+2"},
[10]={{ 2, 0},{-1, 0},{-1,-2},{ 2, 1},{ 0, 1}}, [10]={"+2+0","-1+0","-1-2","+2+1","+0+1"},
[03]={{ 0, 1},{-1, 0},{ 2, 0},{ 2,-1},{-1, 2}}, [03]={"+0+1","-1+0","+2+0","+2-1","-1+2"},
[30]={{-2, 0},{ 1, 0},{ 1,-2},{-2, 1},{ 0, 1}}, [30]={"-2+0","+1+0","+1-2","-2+1","+0+1"},
[12]={{-1, 0},{ 2, 0},{ 2,-1},{ 0,-1},{-1, 2}}, [12]={"-1+0","+2+0","+2-1","+0-1","-1+2"},
[21]={{-2, 0},{ 1, 0},{ 1,-2},{-2, 1},{ 0, 1}}, [21]={"-2+0","+1+0","+1-2","-2+1","+0+1"},
[32]={{ 1, 0},{-2, 0},{-2,-1},{ 0,-1},{ 1, 2}}, [32]={"+1+0","-2+0","-2-1","+0-1","+1+2"},
[23]={{ 2, 0},{-1, 0},{-1,-2},{ 2, 1},{ 0, 1}}, [23]={"+2+0","-1+0","-1-2","+2+1","+0+1"},
[02]={{-1, 0},{ 1, 0},{ 0,-1},{ 0, 1}}, [02]={"-1+0","+1+0","+0-1","+0+1"},
[20]={{ 1, 0},{-1, 0},{ 0, 1},{ 0,-1}}, [20]={"+1+0","-1+0","+0+1","+0-1"},
[13]={{ 0,-1},{-1, 0},{ 1, 0},{ 0, 1}}, [13]={"+0-1","-1+0","+1+0","+0+1"},
[31]={{ 0,-1},{ 1, 0},{-1, 0},{ 0, 1}}, [31]={"+0-1","+1+0","-1+0","+0+1"},
},--I },--I
{ {
[01]={{-1, 0},{ 0, 1},{ 1, 1},{ 0,-3},{ 0, 2},{ 0, 3},{-1, 2}}, [01]={"-1+0","+0+1","+1+1","+0-3","+0+2","+0+3","-1+2"},
[10]={{ 1, 0},{ 0,-1},{-1,-1},{ 0,-2},{ 0,-3},{ 0, 3},{ 1,-2}}, [10]={"+1+0","+0-1","-1-1","+0-2","+0-3","+0+3","+1-2"},
[03]={{ 1, 0},{ 0,-3},{ 0, 1},{ 0, 2},{ 0, 3},{ 1, 2}}, [03]={"+1+0","+0-3","+0+1","+0+2","+0+3","+1+2"},
[30]={{-1, 0},{ 0, 1},{ 0,-2},{ 0,-3},{ 0, 3},{-1,-2}}, [30]={"-1+0","+0+1","+0-2","+0-3","+0+3","-1-2"},
},--Z5 },--Z5
false,--S5 false,--S5
{ {
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{-1,-1},{ 0, 1}}, [01]={"-1+0","-1+1","+0-2","-1-2","-1-1","+0+1"},
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2},{ 0,-1},{ 1, 1}}, [10]={"+1+0","+1-1","+0+2","+1+2","+0-1","+1+1"},
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{-1, 1}}, [03]={"+1+0","+1+1","+0-2","-1+1"},
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2}}, [30]={"-1+0","-1-1","+0+2","-1+2"},
[12]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2},{ 1, 1}}, [12]={"+1+0","+1-1","+0+2","+1+2","+1+1"},
[21]={{-1, 0},{-1,-1},{-1, 1},{ 0,-2},{-1,-2},{-1,-1}}, [21]={"-1+0","-1-1","-1+1","+0-2","-1-2","-1-1"},
[32]={{-1, 0},{-1,-1},{-1, 1},{ 1, 0},{ 0,-1},{ 0, 2},{-1, 2}}, [32]={"-1+0","-1-1","-1+1","+0-1","+0+2","-1+2"},
[23]={{ 1, 0},{ 1, 1},{-1, 0},{ 0,-2},{ 1,-2}}, [23]={"+1+0","+1+1","-1+0","+0-2","+1-2"},
[02]={{-1, 0},{ 0,-1},{ 0, 1}}, [02]={"-1+0","+0-1","+0+1"},
[20]={{ 1, 0},{ 0, 1},{ 0,-1}}, [20]={"+1+0","+0+1","+0-1"},
[13]={{ 1, 0},{ 0, 1},{-1, 0}}, [13]={"+1+0","+0+1","-1+0"},
[31]={{-1, 0},{ 0,-1},{ 1, 0}}, [31]={"-1+0","+0-1","+1+0"},
},--P },--P
false,--Q false,--Q
{ {
[01]={{-1, 0},{ 1, 0},{-1, 1},{ 0,-2},{ 0,-3}}, [01]={"-1+0","+1+0","-1+1","+0-2","+0-3"},
[10]={{ 1, 0},{ 1,-1},{-1, 0},{ 0, 2},{ 0, 3}}, [10]={"+1+0","+1-1","-1+0","+0+2","+0+3"},
[03]={{ 1, 0},{ 1,-1},{ 0, 1},{ 0,-2},{ 0,-3}}, [03]={"+1+0","+1-1","+0+1","+0-2","+0-3"},
[30]={{-1, 1},{ 1, 0},{ 0,-1},{ 0, 2},{ 0, 3}}, [30]={"-1+1","+1+0","+0-1","+0+2","+0+3"},
[12]={{ 1, 0},{ 0,-1},{-1, 0},{ 0, 2}}, [12]={"+1+0","+0-1","-1+0","+0+2"},
[21]={{-1, 0},{ 0, 1},{ 1, 0},{ 0,-2}}, [21]={"-1+0","+0+1","+1+0","+0-2"},
[32]={{-1, 0},{ 0, 1},{-1, 1},{ 1, 0},{ 0, 2},{-2, 0}}, [32]={"-1+0","+0+1","-1+1","+1+0","+0+2","-2+0"},
[23]={{ 1, 0},{ 1,-1},{ 0,-1},{-1, 0},{ 0,-2},{ 2, 0}}, [23]={"+1+0","+1-1","+0-1","-1+0","+0-2","+2+0"},
[02]={{ 1, 0},{-1, 0},{-1,-1}}, [02]={"+1+0","-1+0","-1-1"},
[20]={{-1, 0},{ 1, 0},{ 1, 1}}, [20]={"-1+0","+1+0","+1+1"},
[13]={{ 0,-1},{-1, 1},{ 0, 1}}, [13]={"+0-1","-1+1","+0+1"},
[31]={{ 0,-1},{ 1,-1},{ 0, 1}}, [31]={"+0-1","+1-1","+0+1"},
},--F },--F
false,--E false,--E
{ {
[01]={{ 0,-1},{-1,-1},{ 1, 1},{ 1, 0},{ 1,-3},{-1, 0},{ 0, 2},{-1, 2}}, [01]={"+0-1","-1-1","+1+0","+1+1","+0-3","-1+0","+0+2","-1+2"},
[10]={{ 1, 0},{ 0,-1},{-1,-1},{ 0,-2},{-1, 1},{ 0,-3},{ 1,-2},{ 0, 1}}, [10]={"+1+0","+0-1","-1-1","+0-2","-1+1","+0-3","+1-2","+0+1"},
[03]={{ 0,-1},{ 1,-1},{-1,-1},{-1, 0},{-1,-3},{ 1, 0},{ 0, 2},{ 1, 2}}, [03]={"+0-1","+1-1","-1+0","-1+1","+0-3","+1+0","+0+2","+1+2"},
[30]={{-1, 0},{ 0,-1},{ 1,-1},{ 0,-2},{ 1, 1},{ 0,-3},{-1,-2},{ 0, 1}}, [30]={"-1+0","+0-1","+1-1","+0-2","+1+1","+0-3","-1-2","+0+1"},
[12]={{ 1, 0},{-1, 0},{ 0,-2},{ 0,-3},{ 0, 1},{-1, 1}}, [12]={"+1+0","-1+0","+0-2","+0-3","+0+1","-1+1"},
[21]={{ 1,-1},{-1, 0},{ 1, 0},{ 0,-1},{ 0, 2},{ 0, 3}}, [21]={"+1-1","-1+0","+1+0","+0-1","+0+2","+0+3"},
[32]={{-1, 0},{ 1, 0},{ 0,-2},{ 0,-3},{ 0, 1},{ 1, 1}}, [32]={"-1+0","+1+0","+0-2","+0-3","+0+1","+1+1"},
[23]={{-1,-1},{ 1, 0},{-1, 0},{ 0,-1},{ 0, 2},{ 0, 3}}, [23]={"-1-1","+1+0","-1+0","+0-1","+0+2","+0+3"},
[02]={{ 0, 1},{ 0,-1},{ 0, 2}}, [02]={"+0-1","+0+1","+0+2"},
[20]={{ 0,-1},{ 0, 1},{ 0,-2}}, [20]={"+0-1","+0+1","+0-2"},
[13]={{ 1, 0},{-1, 1},{-2, 0}}, [13]={"+1+0","-1+1","-2+0"},
[31]={{-1, 0},{ 1, 1},{ 2, 0}}, [31]={"-1+0","+1+1","+2+0"},
},--T5 },--T5
{ {
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2}}, [01]={"-1+0","-1+1","+0-2","-1-2"},
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2}}, [10]={"+1+0","+1-1","+0+2","+1+2"},
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2}}, [03]={"+1+0","+1+1","+0-2","+1-2"},
[30]={{-1, 0},{-1,-1},{ 0,-2},{-1, 2}}, [30]={"-1+0","-1-1","+0-2","-1+2"},
[12]={{ 1, 0},{ 1,-1},{ 1, 1}}, [12]={"+1+0","+1-1","+1+1"},
[21]={{-1,-1},{-1, 1},{-1,-1}}, [21]={"-1-1","-1+1","-1-1"},
[32]={{-1, 0},{-1,-1},{-1, 1}}, [32]={"-1+0","-1-1","-1+1"},
[23]={{ 1,-1},{ 1, 1},{ 1,-1}}, [23]={"+1-1","+1+1","+1-1"},
[02]={{ 0, 1}}, [02]={"+0+1"},
[20]={{ 0,-1}}, [20]={"+0-1"},
[13]={{ 0,-1},{ 0, 1},{ 1, 0}}, [13]={"+0-1","+0+1","+1+0"},
[31]={{ 0,-1},{ 0, 1},{-1, 0}}, [31]={"+0-1","+0+1","-1+0"},
},--U },--U
{ {
[01]={{ 0, 1},{-1, 0},{ 0,-2},{-1,-2}}, [01]={"+0+1","-1+0","+0-2","-1-2"},
[10]={{ 0, 1},{ 1, 0},{ 0,-2},{ 1,-2}}, [10]={"+0+1","+1+0","+0-2","+1-2"},
[03]={{ 0,-1},{ 0, 1},{ 0, 2}}, [03]={"+0-1","+0+1","+0+2"},
[30]={{ 0,-1},{ 0, 1},{ 0,-2}}, [30]={"+0-1","+0+1","+0-2"},
[12]={{ 0,-1},{ 0, 1}}, [12]={"+0-1","+0+1"},
[21]={{ 0,-1},{ 0,-2}}, [21]={"+0-1","+0-2"},
[32]={{ 1, 0},{-1, 0}}, [32]={"+1+0","-1+0"},
[23]={{-1, 0},{ 1, 0}}, [23]={"-1+0","+1+0"},
[02]={{-1, 1},{ 1,-1}}, [02]={"-1+1","+1-1"},
[20]={{ 1,-1},{-1, 1}}, [20]={"+1-1","-1+1"},
[13]={{ 1, 1},{-1,-1}}, [13]={"+1+1","-1-1"},
[31]={{-1,-1},{ 1, 1}}, [31]={"-1-1","+1+1"},
},--V },--V
{ {
[01]={{ 0,-1},{-1, 0},{ 1, 0},{ 1,-1},{ 0, 2}}, [01]={"+0-1","-1+0","+1+0","+1-1","+0+2"},
[10]={{ 0,-1},{-1,-1},{ 0, 1},{ 0,-2},{ 1,-2},{ 0, 2}}, [10]={"+0-1","-1-1","+0+1","+0-2","+1-2","+0+2"},
[03]={{ 1, 0},{ 1, 1},{ 0,-1},{ 0,-2},{ 0,-3},{ 1,-1},{ 0, 1},{ 0, 2},{ 0, 3}}, [03]={"+1+0","+1+1","+0-1","+0-2","+0-3","+1-1","+0+1","+0+2","+0+3"},
[30]={{-1, 0},{-1, 1},{ 0,-1},{ 0,-2},{ 0,-3},{-1,-1},{ 0, 1},{ 0, 2},{ 0, 3}}, [30]={"-1+0","-1+1","+0-1","+0-2","+0-3","-1-1","+0+1","+0+2","+0+3"},
[12]={{ 1, 0},{ 0,-1},{-2, 0},{ 1, 1},{-1, 0},{ 0, 1},{-1,-1}}, [12]={"+1+0","+0-1","-2+0","+1+1","-1+0","+0+1","-1-1"},
[21]={{-1, 0},{ 0,-1},{ 2, 0},{-1, 1},{ 1, 0},{ 0, 1},{ 1,-1}}, [21]={"-1+0","+0-1","+2+0","-1+1","+1+0","+0+1","+1-1"},
[32]={{ 0,-1},{ 1, 0},{ 0, 1},{-1, 0},{-1,-1},{ 0, 2}}, [32]={"+0-1","+1+0","+0+1","-1+0","-1-1","+0+2"},
[23]={{ 0,-1},{ 1,-1},{ 0, 1},{ 0,-2},{-1,-2},{ 0, 2}}, [23]={"+0-1","+1-1","+0+1","+0-2","-1-2","+0+2"},
[02]={{ 0,-1},{-1, 0}}, [02]={"+0-1","-1+0"},
[20]={{ 0, 1},{ 1, 0}}, [20]={"+0+1","+1+0"},
[13]={{ 0, 1},{-1, 0}}, [13]={"+0+1","-1+0"},
[31]={{ 0,-1},{ 1, 0}}, [31]={"+0-1","+1+0"},
},--W },--W
function(P,d) function(P,d)
if P.type=="human"then SFX.play("rotate",nil,P:getCenterX()*.15)end if P.type=="human"then SFX.play("rotate",nil,P:getCenterX()*.15)end
@@ -284,89 +292,89 @@ do
P:freshBlock("fresh") P:freshBlock("fresh")
end,--X end,--X
{ {
[01]={{-1, 0},{-1, 1},{ 0,-3},{-1, 1},{-1, 2},{ 0, 1}}, [01]={"-1+0","-1+1","+0-3","-1+1","-1+2","+0+1"},
[10]={{-1, 0},{ 1,-1},{ 0, 3},{ 1,-1},{ 1,-2},{ 0, 1}}, [10]={"-1+0","+1-1","+0+3","+1-1","+1-2","+0+1"},
[03]={{ 0,-1},{ 1,-1},{-1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{ 0,-3},{ 1,-3},{-1, 1}}, [03]={"+0-1","+1-1","-1+0","+1+1","+0-2","+1-2","+0-3","+1-3","-1+1"},
[30]={{ 0, 1},{-1, 1},{ 1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0, 3},{-1, 3},{ 1,-1}}, [30]={"+0+1","-1+1","+1+0","-1-1","+0+2","-1+2","+0+3","-1+3","+1-1"},
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{ 1,-2},{ 0,-2},{ 1, 1},{-1, 0},{ 0, 2},{ 1, 2}}, [12]={"+1+0","+1-1","+0-1","+1-2","+0-2","+1+1","-1+0","+0+2","+1+2"},
[21]={{-1, 0},{-1, 1},{ 0, 1},{-1, 2},{ 0, 2},{-1,-1},{ 1, 0},{ 0,-2},{-1,-2}}, [21]={"-1+0","-1+1","+0+1","-1+2","+0+2","-1-1","+1+0","+0-2","-1-2"},
[32]={{-1, 0},{-1, 1},{-1,-1},{ 1, 0},{ 0, 2},{-1, 2},{ 0,-2}}, [32]={"-1+0","-1+1","-1-1","+1+0","+0+2","-1+2","+0-2"},
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{-1, 0},{ 0,-2},{ 1,-2},{ 0, 2}}, [23]={"+1+0","+1-1","+1+1","-1+0","+0-2","+1-2","+0+2"},
[02]={{ 0,-1},{ 1,-1},{-1, 0},{ 2,-1},{ 0, 1}}, [02]={"+0-1","+1-1","-1+0","+2-1"},
[20]={{ 0, 1},{-1, 1},{ 1, 0},{-2, 1},{ 0,-1}}, [20]={"+0+1","-1+1","+1+0","-2+1"},
[13]={{-1, 0},{-1,-1},{ 0, 1},{-1,-2}}, [13]={"-1+0","-1-1","+0+1","-1-2"},
[31]={{ 1, 0},{ 1, 1},{ 0,-1},{ 1, 2}}, [31]={"+1+0","+1+1","+0-1","+1+2"},
},--J5 },--J5
false,--L5 false,--L5
{ {
[01]={{-1, 0},{-1, 0},{-1, 1},{ 1, 0},{-1, 2},{-1,-1},{ 0,-3},{ 0, 1}}, [01]={"-1+0","-1+0","-1+1","+1+0","-1+2","-1-1","+0-3","+0+1"},
[10]={{-1, 0},{ 1, 0},{ 1,-1},{ 1, 0},{ 1,-2},{ 1, 1},{ 0, 3},{ 0, 1}}, [10]={"-1+0","+1+0","+1-1","+1+0","+1-2","+1+1","+0+3","+0+1"},
[03]={{ 0,-1},{ 1, 0},{ 1,-1},{-1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{ 0,-3},{ 1,-3},{-1, 1}}, [03]={"+0-1","+1+0","+1-1","-1+0","+1+1","+0-2","+1-2","+0-3","+1-3","-1+1"},
[30]={{ 0, 1},{-1, 0},{-1, 1},{ 1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0, 3},{-1, 3},{ 1,-1}}, [30]={"+0+1","-1+0","-1+1","+1+0","-1-1","+0+2","-1+2","+0+3","-1+3","+1-1"},
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{ 1,-2},{ 0,-2},{ 1, 1},{-1, 0},{ 0, 2},{ 1, 2}}, [12]={"+1+0","+1-1","+0-1","+1-2","+0-2","+1+1","-1+0","+0+2","+1+2"},
[21]={{-1, 0},{-1, 1},{ 0, 1},{-1, 2},{ 0, 2},{-1,-1},{ 1, 0},{ 0,-2},{-1,-2}}, [21]={"-1+0","-1+1","+0+1","-1+2","+0+2","-1-1","+1+0","+0-2","-1-2"},
[32]={{ 0,-1},{-1, 0},{-1, 1},{-1,-1},{ 1, 0},{ 0, 2},{-1, 2},{ 0,-2}}, [32]={"+0-1","-1+0","-1+1","-1-1","+1+0","+0+2","-1+2","+0-2"},
[23]={{ 0, 1},{ 1, 0},{ 1,-1},{ 1, 1},{-1, 0},{ 0,-2},{ 1,-2},{ 0, 2}}, [23]={"+0+1","+1+0","+1-1","+1+1","-1+0","+0-2","+1-2","+0+2"},
[02]={{ 0,-1},{ 1,-1},{-1, 0},{ 2,-1},{ 0, 1}}, [02]={"+0-1","+1-1","-1+0","+2-1","+0+1"},
[20]={{ 0, 1},{-1, 1},{ 1, 0},{-2, 1},{ 0,-1}}, [20]={"+0+1","-1+1","+1+0","-2+1","+0-1"},
[13]={{-1, 0},{-1,-1},{ 0, 1},{-1,-2}}, [13]={"-1+0","-1-1","+0+1","-1-2"},
[31]={{ 1, 0},{ 1, 1},{ 0,-1},{ 1, 2}}, [31]={"+1+0","+1+1","+0-1","+1+2"},
},--R },--R
false,--Y false,--Y
{ {
[01]={{-1, 0},{-1, 1},{ 0, 1},{ 1, 0},{-1, 2},{-2, 0},{ 0,-2}}, [01]={"-1+0","-1+1","+0+1","+1+0","-1+2","-2+0","+0-2"},
[10]={{ 1, 0},{-1, 0},{ 0,-1},{ 1,-1},{ 1,-2},{ 2, 0},{ 0, 2}}, [10]={"+1+0","-1+0","+0-1","+1-1","+1-2","+2+0","+0+2"},
[03]={{-1, 0},{ 1,-1},{ 0,-2},{ 0,-3},{ 1, 0},{ 1,-2},{ 1,-3},{ 0, 1},{-1, 1}}, [03]={"-1+0","+1-1","+0-2","+0-3","+1+0","+1-2","+1-3","+0+1","-1+1"},
[30]={{-1, 0},{ 1,-1},{ 1,-2},{ 1, 0},{ 0,-2},{ 1,-3},{-1, 2},{ 0, 3},{-1, 3}}, [30]={"-1+0","+1-1","+1-2","+1+0","+0-2","+1-3","-1+2","+0+3","-1+3"},
[12]={{-1, 0},{ 1,-1},{-1,-1},{ 1,-2},{ 1, 0},{ 0,-2},{ 1,-3},{-1, 2},{ 0, 3},{-1, 3}}, [12]={"-1+0","+1-1","-1-1","+1-2","+1+0","+0-2","+1-3","-1+2","+0+3","-1+3"},
[21]={{-1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 0,-3},{ 1, 0},{ 1,-2},{ 1,-3},{ 0, 1},{-1, 1}}, [21]={"-1+0","+1-1","+1+1","+0-2","+0-3","+1+0","+1-2","+1-3","+0+1","-1+1"},
[32]={{-1, 0},{ 0,-1},{-1,-2},{ 1,-1},{ 1, 0},{ 1, 1},{ 0, 2},{ 0, 3}}, [32]={"-1+0","+0-1","-1-2","+1-1","+1+0","+1+1","+0+2","+0+3"},
[23]={{ 0,-2},{ 0,-3},{ 1, 2},{ 1, 0},{ 0, 1},{-1, 1},{ 0,-1},{ 0, 2}}, [23]={"+0-2","+0-3","+1+2","+1+0","+0+1","-1+1","+0-1","+0+2"},
[02]={{-1, 0},{ 0, 2},{ 0,-1}}, [02]={"-1+0","+0+2","+0-1"},
[20]={{ 1, 0},{ 0,-2},{ 0, 1}}, [20]={"+1+0","+0-2","+0+1"},
[13]={{-1, 0},{-1,-1},{ 0, 1},{ 1, 2}}, [13]={"-1+0","-1-1","+0+1","+1+2"},
[31]={{ 1, 0},{ 1, 1},{ 0,-1},{-1,-2}}, [31]={"+1+0","+1+1","+0-1","-1-2"},
},--N },--N
false,--H false,--H
{ {
[01]={{ 1,-1},{ 1, 0},{ 1, 1},{ 0, 1},{-1, 1},{-1, 0},{-1,-1},{ 0,-1},{ 0,-2},{-2,-1},{-2,-2},{ 2, 0},{ 2,-1},{ 2,-2},{ 1, 2},{ 2, 2},{-1, 2},{-2, 2}}, [01]={"+1-1","+1+0","+1+1","+0+1","-1+1","-1+0","-1-1","+0-1","+0-2","-2-1","-2-2","+2+0","+2-1","+2-2","+1+2","+2+2","-1+2","-2+2"},
[10]={{-1, 0},{-1,-1},{ 0,-1},{ 1,-1},{-2,-2},{-2,-1},{-2, 0},{-1,-2},{ 0,-2},{ 1,-2},{ 2,-2},{-1, 1},{-2, 1},{-2, 2},{ 1, 0},{ 2, 0},{ 2,-1},{ 0, 1},{ 1,-1},{ 2,-2}}, [10]={"-1+0","-1-1","+0-1","+1-1","-2-2","-2-1","-2+0","-1-2","+0-2","+1-2","+2-2","-1+1","-2+1","-2+2","+1+0","+2+0","+2-1","+0+1","+1-1","+2-2"},
[03]={{-1,-1},{-1, 0},{-1, 1},{-0, 1},{ 1, 1},{ 1, 0},{ 1,-1},{-0,-1},{-0,-2},{ 2,-1},{ 2,-2},{-2, 0},{-2,-1},{-2,-2},{-1, 2},{-2, 2},{ 1, 2},{ 2, 2}}, [03]={"-1-1","-1+0","-1+1","-0+1","+1+1","+1+0","+1-1","-0-1","-0-2","+2-1","+2-2","-2+0","-2-1","-2-2","-1+2","-2+2","+1+2","+2+2"},
[30]={{ 1, 0},{ 1,-1},{-0,-1},{-1,-1},{ 2,-2},{ 2,-1},{ 2, 0},{ 1,-2},{-0,-2},{-1,-2},{-2,-2},{ 1, 1},{ 2, 1},{ 2, 2},{-1, 0},{-2, 0},{-2,-1},{ 0, 1},{-1,-1},{-2,-2}}, [30]={"+1+0","+1-1","-0-1","-1-1","+2-2","+2-1","+2+0","+1-2","-0-2","-1-2","-2-2","+1+1","+2+1","+2+2","-1+0","-2+0","-2-1","+0+1","-1-1","-2-2"},
},--I5 },--I5
{ {
[01]={{-1, 0},{-1,-1},{ 1, 1},{-1, 1}}, [01]={"-1+0","-1-1","+1+1","-1+1"},
[10]={{-1, 0},{ 1, 0},{-1,-1},{ 1, 1}}, [10]={"-1+0","+1+0","-1-1","+1+1"},
[03]={{ 1, 0},{ 1,-1},{-1, 1},{ 1, 1}}, [03]={"+1+0","+1-1","-1+1","+1+1"},
[30]={{ 1, 0},{-1, 0},{ 1,-1},{-1, 1}}, [30]={"+1+0","-1+0","+1-1","-1+1"},
},--I3 },--I3
{ {
[01]={{-1, 0},{ 1, 0}}, [01]={"-1+0","+1+0"},
[10]={{ 1, 0},{-1, 0}}, [10]={"+1+0","-1+0"},
[03]={{ 0, 1},{ 0,-1}}, [03]={"+0+1","+0-1"},
[30]={{ 0,-1},{ 0, 1}}, [30]={"+0-1","+0+1"},
[12]={{ 0, 1},{ 0,-1}}, [12]={"+0+1","+0-1"},
[21]={{ 0,-1},{ 0, 1}}, [21]={"+0-1","+0+1"},
[32]={{-1, 0},{ 1, 0}}, [32]={"-1+0","+1+0"},
[23]={{ 1, 0},{-1, 0}}, [23]={"+1+0","-1+0"},
[02]={{ 0,-1},{ 1,-1},{-1,-1}}, [02]={"+0-1","+1-1","-1-1"},
[20]={{ 0, 1},{-1, 1},{ 1, 1}}, [20]={"+0+1","-1+1","+1+1"},
[13]={{ 0,-1},{-1,-1},{ 1,-1}}, [13]={"+0-1","-1-1","+1-1"},
[31]={{ 0, 1},{ 1, 1},{-1, 1}}, [31]={"+0+1","+1+1","-1+1"},
},--C },--C
{ {
[01]={{-1, 0},{ 0, 1}}, [01]={"-1+0","+0+1"},
[10]={{ 1, 0},{ 0, 1}}, [10]={"+1+0","+0+1"},
[03]={{ 1, 0},{ 0, 1}}, [03]={"+1+0","+0+1"},
[30]={{-1, 0},{ 0, 1}}, [30]={"-1+0","+0+1"},
[12]={{ 1, 0},{ 0, 2}}, [12]={"+1+0","+0+2"},
[21]={{ 0,-1},{-1, 0}}, [21]={"+0-1","-1+0"},
[32]={{-1, 0},{ 0, 2}}, [32]={"-1+0","+0+2"},
[23]={{ 0,-1},{-1, 0}}, [23]={"+0-1","-1+0"},
[02]={{ 0,-1},{ 0, 1}}, [02]={"+0-1","+0+1"},
[20]={{ 0, 1},{ 0,-1}}, [20]={"+0+1","+0-1"},
[13]={{-1, 0},{ 1, 0}}, [13]={"-1+0","+1+0"},
[31]={{ 1, 0},{-1, 0}}, [31]={"+1+0","-1+0"},
},--I2 },--I2
nil,--O1 nil,--O1
} }
@@ -378,9 +386,9 @@ do
TRS[20]=reflect(TRS[19])--L5J5 TRS[20]=reflect(TRS[19])--L5J5
TRS[22]=reflect(TRS[21])--RY TRS[22]=reflect(TRS[21])--RY
TRS[24]=reflect(TRS[23])--NH TRS[24]=reflect(TRS[23])--NH
C_sym(TRS[8])C_sym(TRS[9])--S5Z5 centroSymSet(TRS[8])centroSymSet(TRS[9])--S5Z5
C_sym(TRS[25])C_sym(TRS[26])--I5I3 centroSymSet(TRS[25])centroSymSet(TRS[26])--I5I3
for i=1,29 do collect(TRS[i])end for i=1,29 do collectSet(TRS[i])end
pushZero(TRS) pushZero(TRS)
end end
@@ -388,35 +396,35 @@ local SRS
do do
SRS={ SRS={
{ {
[01]={{-1,0},{-1, 1},{ 0,-2},{-1,-2}}, [01]={"-1+0","-1+1","+0-2","-1-2"},
[10]={{ 1,0},{ 1,-1},{ 0, 2},{ 1, 2}}, [10]={"+1+0","+1-1","+0+2","+1+2"},
[03]={{ 1,0},{ 1, 1},{ 0,-2},{ 1,-2}}, [03]={"+1+0","+1+1","+0-2","+1-2"},
[30]={{-1,0},{-1,-1},{ 0, 2},{-1, 2}}, [30]={"-1+0","-1-1","+0+2","-1+2"},
[12]={{ 1,0},{ 1,-1},{ 0, 2},{ 1, 2}}, [12]={"+1+0","+1-1","+0+2","+1+2"},
[21]={{-1,0},{-1, 1},{ 0,-2},{-1,-2}}, [21]={"-1+0","-1+1","+0-2","-1-2"},
[32]={{-1,0},{-1,-1},{ 0, 2},{-1, 2}}, [32]={"-1+0","-1-1","+0+2","-1+2"},
[23]={{ 1,0},{ 1, 1},{ 0,-2},{ 1,-2}}, [23]={"+1+0","+1+1","+0-2","+1-2"},
[02]={},[20]={},[13]={},[31]={}, [02]={},[20]={},[13]={},[31]={},
},--Z },--Z
false,--S false,--S
false,--J false,--J
false,--L false,--L
false,--T false,--T
noKick,--O noKickSet,--O
{ {
[01]={{-2, 0},{ 1, 0},{-2,-1},{ 1, 2}}, [01]={"-2+0","+1+0","-2-1","+1+2"},
[10]={{ 2, 0},{-1, 0},{ 2, 1},{-1,-2}}, [10]={"+2+0","-1+0","+2+1","-1-2"},
[12]={{-1, 0},{ 2, 0},{-1, 2},{ 2,-1}}, [12]={"-1+0","+2+0","-1+2","+2-1"},
[21]={{ 1, 0},{-2, 0},{ 1,-2},{-2, 1}}, [21]={"+1+0","-2+0","+1-2","-2+1"},
[23]={{ 2, 0},{-1, 0},{ 2, 1},{-1,-2}}, [23]={"+2+0","-1+0","+2+1","-1-2"},
[32]={{-2, 0},{ 1, 0},{-2,-1},{ 1, 2}}, [32]={"-2+0","+1+0","-2-1","+1+2"},
[30]={{ 1, 0},{-2, 0},{ 1,-2},{-2, 1}}, [30]={"+1+0","-2+0","+1-2","-2+1"},
[03]={{-1, 0},{ 2, 0},{-1, 2},{ 2,-1}}, [03]={"-1+0","+2+0","-1+2","+2-1"},
[02]={},[20]={},[13]={},[31]={}, [02]={},[20]={},[13]={},[31]={},
}--I }--I
} }
collect(SRS[1]) collectSet(SRS[1])
collect(SRS[7]) collectSet(SRS[7])
pushZero(SRS) pushZero(SRS)
for i=2,5 do SRS[i]=SRS[1]end for i=2,5 do SRS[i]=SRS[1]end
for i=8,29 do SRS[i]=SRS[1]end for i=8,29 do SRS[i]=SRS[1]end
@@ -424,7 +432,8 @@ end
local C2 local C2
do do
local L={{0,0},{-1,0},{1,0},{0,-1},{-1,-1},{1,-1},{-2,0},{2,0}} local L={"+0+0","-1+0","+1+0","+0-1","-1-1","+1-1","-2+0","+2+0"}
vecStrConv(L)
C2={ C2={
{ {
[01]=L,[10]=L,[12]=L,[21]=L, [01]=L,[10]=L,[12]=L,[21]=L,
@@ -432,36 +441,35 @@ do
[02]=L,[20]=L,[13]=L,[31]=L, [02]=L,[20]=L,[13]=L,[31]=L,
} }
} }
collect(C2[1])
for i=2,29 do C2[i]=C2[1]end for i=2,29 do C2[i]=C2[1]end
end end
local C2sym local C2sym
do do
local L={{0,0},{-1,0},{1,0},{0,-1},{-1,-1},{1,-1},{-2,0},{2,0}} local L={"+0+0","-1+0","+1+0","+0-1","-1-1","+1-1","-2+0","+2+0"}
local R={{0,0},{1,0},{-1,0},{0,-1},{1,-1},{-1,-1},{2,0},{-2,0}} local R={"+0+0","+1+0","-1+0","+0-1","+1-1","-1-1","+2+0","-2+0"}
local Z={ local Z={
[01]=R,[10]=L,[03]=L,[30]=R, [01]=R,[10]=L,[03]=L,[30]=R,
[12]=R,[21]=L,[32]=L,[23]=R, [12]=R,[21]=L,[32]=L,[23]=R,
[02]=R,[20]=L,[13]=L,[31]=R, [02]=R,[20]=L,[13]=L,[31]=R,
} }
collect(Z)
local S=reflect(Z) local S=reflect(Z)
collect(S) collectSet(Z)
collectSet(S)
C2sym={ C2sym={
Z,S,--Z,S Z,S,--Z,S
Z,S,--J,L Z,S,--J,L
Z,--T Z,--T
noKick,--O noKickSet,--O
Z,--I Z,--I
Z,S,--Z5,S5 Z,S,--Z5,S5
Z,S,--P,Q Z,S,--P,Q
Z,S,--F,E Z,S,--F,E
Z,Z,Z,Z,--T5,U,V,W Z,Z,Z,Z,--T5,U,V,W
noKick,--X noKickSet,--X
Z,S,--J5,L5 Z,S,--J5,L5
Z,S,--R,Y Z,S,--R,Y
Z,S,--N,H Z,S,--N,H
@@ -472,10 +480,10 @@ do
end end
local Classic={} local Classic={}
for i=1,29 do Classic[i]=noKick end for i=1,29 do Classic[i]=noKickSet end
local None={} local None={}
for i=1,29 do None[i]=noKick_180 end for i=1,29 do None[i]=noKickSet_180 end
return{ return{
TRS=TRS, TRS=TRS,