'ProgramMode:RUN
"ERROR"Disps"The government of the district in which the company operating this game is not able to acess the running functions of their"Disps"products.As this happens,the system will display this message."Disps"Right now,the federal government is in main control of this page.They have decided not to run this app"Disps"Right now,the app ban is sitting at 27 days"Disps"If the federal government is nice enough the ban will be a week long"
"EXE Gain acess"DispsRanInt#(1,100)->Theta
Theta=69=>Goto Theta
Theta=21=>Goto Theta
Theta=45=>Goto Theta
Theta=90=>Goto Theta
Theta=96=>Goto Theta
Theta=98=>Goto Theta
Stop
Lbl Theta
F<>G=>Goto 1

'=====RANDOMIZER====
Lbl 4
S-Gph2 DrawOff
Q->P
For 1->R To 4
RanInt#(1,7->Q
 Not StrSrc(Str 1,StrMid("1234567",Q,1))=>Break
Next
StrMid("1234567",Q,1)+StrLeft(Str 1,3->Str 1
104-(Q<=2)+3Mat->List(B,Q->List1
42-3(Q=2)+3Mat->List(B,Q+7->List2
Text 18,99,"   ":
DrawStat:

'===NEW TETRAMINO===
Lbl 5
StoPict 1
8->X:24->Y:2->F:0->R:0->E
0->V~W:P=2=>Dsz Y
Mat->List(B,P->List3
Mat->List(B,P+7->List4
3X+38+3List3->List1
3Y-10+3List4->List2
If Mat A[X+List3[1,Y+List4[1]]+Mat A[X+List3[2,Y+List4[2]]+Mat A[X+List3[3,Y+List4[3]]+Mat A[X+List3[4,Y+List4[4
Then 0->Z:Return
IfEnd

'========DRAW=======
Lbl 1
Cls
'/_@FA_9
DrawStat
'/_@7F5F__@F94F__(-)_12

'========MAIN=======
Lbl 0:'/_@7F5F__@F94F__(-)_1
Getkey->K
Dsz F: Not K=>Goto 0

'========DROP=======
If K=37 Or  Not F
Then Dsz Y
Y<D=>Mat A[X+List3[1,Y+List4[1]]+Mat A[X+List3[2,Y+List4[2]]+Mat A[X+List3[3,Y+List4[3]]+Mat A[X+List3[4,Y+List4[4=>Goto 2
List2-3->List2:G->F
K=37=>Isz S
Goto 1:IfEnd

'========LEFT=======
If K=38:Then Mat A[X-1+List3[1,Y+List4[1]]+Mat A[X-1+List3[2,Y+List4[2]]+Mat A[X-1+List3[3,Y+List4[3]]+Mat A[X-1+List3[4,Y+List4[4=>Goto 0
Dsz X:List1-3->List1
Goto 1:IfEnd

'=======RIGHT=======
If K=27:Then Mat A[X+1+List3[1,Y+List4[1]]+Mat A[X+1+List3[2,Y+List4[2]]+Mat A[X+1+List3[3,Y+List4[3]]+Mat A[X+1+List3[4,Y+List4[4=>Goto 0
Isz X:List1+3->List1
Goto 1:IfEnd

'====ROTATE LEFT====
If K=79
Then 0->T:(-)List4+(P<=2->List5
If Mat A[X+List5[1,Y+List3[1]]+Mat A[X+List5[2,Y+List3[2]]+Mat A[X+List5[3,Y+List3[3]]+Mat A[X+List5[4,Y+List3[4
Then For 1->T To 4
X-Mat B[T,15+R+10(P=2->V
Y-Mat B[T,20+R+10(P=2->W
Mat A[V+List5[1,W+List3[1]]+Mat A[V+List5[2,W+List3[2]]+Mat A[V+List5[3,W+List3[3]]+Mat A[V+List5[4,W+List3[4
 Not Ans=>Break
Next
Ans=>Goto 0
V->X:W->Y:IfEnd
T-Exp4X-Exp3Y->E
MOD(R-1,4->R
List3->List4:List5->List3
3X+38+3List3->List1
3Y-10+3List4->List2
'/_@7F5F__@F94F__(-)_8
Goto 1:IfEnd

'====ROTATE RIGHT===
If K=69
Then 0->T:(-)List3+(P<=2->List5
If Mat A[X+List4[1,Y+List5[1]]+Mat A[X+List4[2,Y+List5[2]]+Mat A[X+List4[3,Y+List5[3]]+Mat A[X+List4[4,Y+List5[4
Then For 1->T To 4
X+Mat B[T,R+16+10(P=2->V
Y+Mat B[T,R+21+10(P=2->W
Mat A[V+List4[1,W+List5[1]]+Mat A[V+List4[2,W+List5[2]]+Mat A[V+List4[3,W+List5[3]]+Mat A[V+List4[4,W+List5[4
 Not Ans=>Break
Next
Ans=>Goto 0
V->X:W->Y:IfEnd
T-Exp4X-Exp3Y->E
MOD(R+1,4->R
List4->List3:List5->List4
3X+38+3List3->List1
3Y-10+3List4->List2
'/_@7F5F__@F94F__(-)_8
Goto 1:IfEnd

'=====HARD DROP=====
If K=28:Then Dsz Y
Y-D:If Ans>0
Then D->Y:S+2Ans->S
List2-3Ans->List2
Else Mat A[X+List3[1,Y+List4[1]]+Mat A[X+List3[2,Y+List4[2]]+Mat A[X+List3[3,Y+List4[3]]+Mat A[X+List3[4,Y+List4[4=>Goto 2
IfEnd
Do:List2-3->List2
Dsz Y:Isz S:Isz S
LpWhile 0=Mat A[X+List3[1,Y+List4[1]]+Mat A[X+List3[2,Y+List4[2]]+Mat A[X+List3[3,Y+List4[3]]+Mat A[X+List3[4,Y+List4[4
Isz Y
15->F:Goto 1:IfEnd

'========HOLD=======
If K=78 And H>=0
Then 23-2(P<=2)+3Mat->List(B,P->List1
42-3(P=2)+3Mat->List(B,P+7->List2
H:(-)P->H:Ans->P
S-Gph3 DrawOff:Cls
Text 18,17,"   ":
DrawStat:
P=>Goto 5:Goto 4
IfEnd

K<>47=>Goto 0
Return

'===LOCK TETRAMINO==
Lbl 2
Abs H->H:Isz Y
S-Gph2 DrawOn
S-Gph1 DrawOff
DrawStat
S-Gph1 DrawOn
1->Mat A[X+List3[1,Y+List4[1
1->Mat A[X+List3[2,Y+List4[2
1->Mat A[X+List3[3,Y+List4[3
1->Mat A[X+List3[4,Y+List4[4

'=======T_-_SPIN======
If P=3(T-Exp4X-Exp3Y=E
Then Dsz X
0<>Mat A[X,Y+1->List6[1
0<>Mat A[X+2,Y+1->List6[2
0<>Mat A[X+2,Y-1->List6[3
0<>Mat A[X,Y-1->List6[4
Sum List6>2=>(T=4)+List6[R+1]+List6[R+2-4(R=3->E
E-(E=3->E
Else 0->E:IfEnd

'====CLEAR LINES====
For Y-1->Y To Y+4
Sum Mat->List(A,Y
Ans Rmdr 10=0=>Break
Next
If  Not Ans
Then Y+1->D:0->C
E>0=>Goto 3:IfEnd
Ans<>10=>Goto 4
70-3D:Ans<1=>1
For 70-3Y->W To Ans Step (-)6
Text W,48,"        ":
Next
W=4=>Text 1,48,"        ":
For Y->W To 25
Do:Isz Y
Sum Mat->List(A,Y
LpWhile Ans>9
 Not Ans=>Break
0->T:{0->List1:{0->List2
For 4->X To 13
Mat A[X,Y
Ans->Mat A[X,W
If Ans:Then Isz T
38+3X->List1[T
3W-10->List2[T
IfEnd:Next
DrawStat:
Next
Y-W:W+1->D
For W->W To Y
For 4->X To 13
0->Mat A[X,W
Next:Next

'======SCORING======
L+Ans->L:S+50CM->S:Int (Int .1L/1.95-11.35)^<2>->G
Isz C:Ans<4=>1->B
If D=5:Then {800,1200,1800,2Exp3,3200
S+MList Ans[Ans+(UAns=16->S
Ans->U:IfEnd
Lbl 3
{Exp2,300,500,800B,Exp2,200B,400B,0,0,400,800B,1200B,1600B
S+MList Ans[Ans+5E->S
Int .1L->M
Text 1,26,S:
Text 1,113,M:
Z=2=>Text 58,113,L
Isz M
Text 58,1,StrMid("      S|NGLEDOUBLETRIPLETETRIS",6Ans+1,6)+StrMid("!         ! B2B      tspi_#E5DE_     tspi_#E5DE_|B2B!TSP|N    !TSP|N|B2B!CLEAR    !CLEAR|B2B",1+10(B>1)+20E+60(D=5),6+4(1<B(E>0 Or D=5)))
Ans=4 Or EAns=>1.5->B
Z=2=>L>=40=>Return
Goto 4

'=======GHOST=======
Lbl 9
Y->W
Do:Dsz W
LpWhile 0=Mat A[X+List3[1,W+List4[1]]+Mat A[X+List3[2,W+List4[2]]+Mat A[X+List3[3,W+List4[3]]+Mat A[X+List3[4,W+List4[4
Exp2List1+List2
300X+3W+300List3+3List4+3793->List5
For 1->V To 4
For 1->W To 4
List Ans[V]=List5[W=>0->List5[W
Next:Next
Int .01List5
List5-Exp2List Ans->List5
S-Gph3 DrawOn,Scatter,List Ans,List5,1,Dot

Text 1,26,S:
Z<3=>Return
Text 58,112,"  ":
Text 58,109,Int (15360-@7F5F)frac128:
@7F5F<=15360=>Return