Code: :DCS
"0000005500000000000000550000000000000055000000000000005500000000000000550000000000000055000000000000005500000000000000550000000077777700000011007777770000001100774444000022111177444400002211116644440022223311664444002222331166666600223333336666660022333333
ClrDraw:AxesOff
2->W:1->D:5->C:1->V:2->T:1->U:0->P:1->theta
randInt(10,16->E
1+(E/|E2->E
0->Xmin:0->Ymin
264->Xmax:164->Ymax
Text(~1,1,91,"BTetris
Line(114,54,114,117,2,12
Line(148,54,148,117,2,12
Line(116,52,147,52,2,12
Line(116,119,147,119,2,12
{21,10->dim([A]
Fill(0,[A]
D->G
While W=2
getKey->K
If max(K={24,26,21,31:Then
Pt-Off((115+C*3)+L1(1),(115-(D)*3)-L1(2),1
Pt-Off((115+C*3)+L1(3),(115-(D)*3)-L1(4),1
Pt-Off((115+C*3)+L1(5),(115-(D)*3)-L1(6),1
Pt-Off((115+C*3)+L1(7),(115-(D)*3)-L1(8),1
End
C-((K=24 and C>1)-(K=26 and C+A<10->C
If F!=C:C->F
V-(C+(A-1(A=2)+2(A=0)-2(A=3))<10)((K=31 and V>0)-(K=21 and V<5->V
If V=0:4->V
If V=5:1->V
If K=21 or K=31:1->theta
If K=105:Then
Text(150,110,"Paused
Pause
Text(150,110,"
End
If K=22:Then
DelVar [A]DelVar WDelVar L1DelVar |LADelVar |LBDelVar |LCDelVar |LD
ClrDraw:Disp :Return:End
If theta=1:Then
If |E2fPart(E)=10:Then
If V=1 or V=3:{3,0,6,0,0,3,3,3->L1
If V=2 or V=4:{0,0,0,3,3,3,3,6->L1
End
If |E2fPart(E)=11:Then
If V=1 or V=3:{0,0,3,0,3,3,6,3->L1
If V=2 or V=4:{3,0,3,3,0,3,0,6->L1
End
If |E2fPart(E)=12:Then
If V=1:{3,0,0,3,3,3,6,3->L1
If V=2:{0,0,0,3,0,6,3,3->L1
If V=3:{0,0,3,0,6,0,3,3->L1
If V=4:{3,0,3,3,3,6,0,3->L1
End
If |E2fPart(E)=13:Then
If V>0 and V<5:{0,0,3,0,3,3,0,3->L1
End
If |E2fPart(E)=14:Then
If V=1 or V=3:{0,0,3,0,6,0,9,0->L1
If V=2 or V=4:{0,0,0,3,0,6,0,9->L1
End
If |E2fPart(E)=15:Then
If V=1:{0,0,0,3,3,3,6,3->L1
If V=2:{0,0,3,0,0,3,0,6->L1
If V=3:{0,0,3,0,6,0,6,3->L1
If V=4:{3,0,3,3,3,6,0,6->L1
End
If |E2fPart(E)=16:Then
If V=1:{0,3,3,3,6,3,6,0->L1
If V=2:{0,0,0,3,0,6,3,6->L1
If V=3:{0,0,3,0,6,0,0,3->L1
If V=4:{0,0,3,0,3,3,3,6->L1
End
|E2fPart(E->Z
If max(Z={10,11,12,15,16:Then
If V=1 or V=3:Then:2->A:1->B:End
If V=2 or V=4:Then:1->A:2->B:End:End
If Z=13:Then:1->A:1->B:End
If Z=14:Then
If V=1 or V=3:Then:3->A:0->B:End
If V=2 or V=4:Then:0->A:3->B:End
End
0->theta
End
If D=G:Then
Pt-On((115+C*3)+L1(1),(115-(D)*3)-L1(2),1,|E2fPart(E
Pt-On((115+C*3)+L1(3),(115-(D)*3)-L1(4),1,|E2fPart(E
Pt-On((115+C*3)+L1(5),(115-(D)*3)-L1(6),1,|E2fPart(E
Pt-On((115+C*3)+L1(7),(115-(D)*3)-L1(8),1,|E2fPart(E
End
If T>U:Then
If D+B=20 or iPart([A](D+(L1(2)/3)+1,C+(L1(1)/3)))=1 or iPart([A](D+(L1(4)/3)+1,C+(L1(3)/3)))=1 or iPart([A](D+(L1(6)/3)+1,C+(L1(5)/3)))=1 or iPart([A](D+(L1(8)/3)+1,C+(L1(7)/3)))=1:Then
E->[A](D+(L1(2)/3),C+(L1(1)/3
E->[A](D+(L1(4)/3),C+(L1(3)/3
E->[A](D+(L1(6)/3),C+(L1(5)/3
E->[A](D+(L1(8)/3),C+(L1(7)/3
Matr>list([A]^^T,D,|LA
If D+1<=21:Matr>list([A]^^T,D+1,|LB
If D+2<=21:Matr>list([A]^^T,D+2,|LC
If D+3<=21:Matr>list([A]^^T,D+3,|LD
If sum(iPart(|LA))=10:Then
0->L
For(O,1,10
Pt-Off(115+O*3,115-D*3,1
0->[A](D-1,O
End
End
If D+1<=21:Then
If sum(iPart(|LB))=10:Then
1->L
For(O,1,10
Pt-Off(115+O*3,(115-(D+1)*3),1
0->[A](D,O
End
End:End
If D+2<=21:Then
If sum(iPart(|LC))=10:Then
2->L
For(O,1,10
Pt-Off(115+O*3,(115-(D+2)*3),1
0->[A](D+1,O
End
End:End
If D+3<=21:Then
If sum(iPart(|LD))=10:Then
3->L
For(O,1,10
Pt-Off(115+O*3,(115-(D+3)*3),1
0->[A](D+2,O
End
End:End
If L<5:3->W
0->R
(D+L)-1->M
While W=3
Matr>list([A]^^T,M,|LA
Pt-On(105,115-M*3,1,10
Text(1,1,D
Text(14,1,L
Text(27,1,M
Text(40,1,sum(|LA)
If sum(|LA)>0:Then
For(O,1,10
Pt-Off(115+O*3,115-M*3,1
[A](M,O)->[A](M+1,O
0->[A](M,O
If [A](M+1,O)>0
Pt-On(115+O*3,(115-(M+1)*3),1,|E2fPart([A](M+1,O
End
End
If R>5 and (sum(iPart(|LA))=0 or M<3:2->W
M-1->M:R+1->R
End:"W=3
0->D:5->C:1->V:1->P:1->theta
S+1->S
randInt(10,16->E
1+(E/|E2->E
End
D+1->D
End
If P=0 and D!=G:Then
Pt-Off((115+F*3)+L1(1),(115-(G)*3)-L1(2),1
Pt-Off((115+F*3)+L1(3),(115-(G)*3)-L1(4),1
Pt-Off((115+F*3)+L1(5),(115-(G)*3)-L1(6),1
Pt-Off((115+F*3)+L1(7),(115-(G)*3)-L1(8),1
D->G
End
If P=1:D->G
0->P:5->L
End:"W=2
The issue is inside the While W=3 segment. For whatever reason, I'm getting this:
I don't know what else to do with this thing, it's not making sense that it's doing what it is doing.
So, a fresh set of eyes is in order.
I appreciate it ahead of time if anyone looks at the code, thanks.