Also stop representing them in the data.
NBRFAEJR4UBMKQ7NSMMDFKVDP7UVIIBQZORVQAPK2W4VFQBVJVKQC
PVRAOHXFGEIFWQRGNDLIBNNEBHNYJMR7VS76N3IWNYRTLQIFSQHQC
VIRRFSPT5RF3FHHHIOUXDTRR7AQK7MLLUEW7CWKQDTYEMI7J4QRQC
F4UTUIOYDJ3HC4P5JFCBJDOQMZN4XOGKQWLKVVWGRPLLFIHXQHZQC
6RN2M65LZLKSK3DJN4TAMLSDRZ3SG7OFDIPQXIYEC66WLII2IBNAC
S5ADH7USXGZCRISF5TQOAST7RQQ2EUX5QVLFMGVTWTS65KFOO7MAC
PRGPM7QVW24DZAAZMGG7UEKE53VU5QOVMUEQZQ4TTGQMADCUU7WAC
A3QGK6JT2GWKBWS5KUNBTQD6ZXQXH634SX4TRMBAJTOV6MRCFC5AC
DBLWPN3OTFLQ5HBPZPZQA265Z7RLDZ4PVQJ5X4GDMVG5P32E3HCQC
VRNGQ4FWZKJXBZYRA263FJ6A63OO74WIBLKXONY27IZUFJLNMPQAC
Ind={Ind='X', Pak=2, Aus=2},
NZ={NZ='X', Eng=2},
SA={SA='X', Aus=2, SL=2},
Pak={Pak='X', Ind=0, SL=2},
Aus={Aus='X', Ind=0, SA=0, SL=2},
SL={SL='X', SA=0, Pak=0, Aus=0},
Eng={Eng='X', NZ=0}
}
Ind={Pak=2, Aus=2},
NZ={Eng=2},
SA={Aus=2, SL=2},
Pak={Ind=0, SL=2},
Aus={Ind=0, SA=0, SL=2},
SL={SA=0, Pak=0, Aus=0},
Eng={NZ=0}
}
button(Global_state, t1..t2, {
x=l, y=top+y*c,
w=cx[x] - l,
h=c,
bg = {r=0,g=0,b=0, a=0}, -- nothing
icon = function(params)
make_button_pop(params)
if Data[t1][t2] then
local px = (params.w - App.width(Data[t1][t2])) / 2
App.color{r=0, g=0, b=0}
love.graphics.print(Data[t1][t2], params.x+px, params.y+py)
end
end,
onpress1 = function()
local v = Data[t1][t2]
if v == 'X' then
return
elseif v == nil then
Data[t1][t2] = 0 Data[t2][t1] = 2
elseif v == 0 then
Data[t1][t2] = 2 Data[t2][t1] = 0
elseif v == 2 then
Data[t1][t2] = nil Data[t2][t1] = nil
else
error('invalid value')
end
end,
})
if t1 == t2 then
-- no button
local px = (cx[x] - l - App.width('X')) / 2
App.color{r=0, g=0, b=0}
love.graphics.print('X', l+px, top+y*c+py)
else
button(Global_state, t1..t2, {
x=l, y=top+y*c,
w=cx[x] - l,
h=c,
bg = {r=0,g=0,b=0, a=0}, -- nothing
icon = function(params)
make_button_pop(params)
if Data[t1][t2] then
local px = (params.w - App.width(Data[t1][t2])) / 2
App.color{r=0, g=0, b=0}
love.graphics.print(Data[t1][t2], params.x+px, params.y+py)
end
end,
onpress1 = function()
local v = Data[t1][t2]
if v == 'X' then
return
elseif v == nil then
Data[t1][t2] = 0 Data[t2][t1] = 2
elseif v == 0 then
Data[t1][t2] = 2 Data[t2][t1] = 0
elseif v == 2 then
Data[t1][t2] = nil Data[t2][t1] = nil
else
error('invalid value')
end
end,
})
end