gameblet

```
If dim(⌊X)>0:Then
For(I,1,dim(⌊X))
Output(⌊Y(I),⌊X(I)," ")
End
For(I,1,dim(⌊X))
If ⌊D(I)=0:Then
⌊X(I)+1→⌊X(I)
Else
⌊X(I)-1→⌊X(I)
End
For(I,1,dim(⌊X))
0→T
⌊X(I)→G
⌊Y(I)→H
prgmPOSITION
If ⌊D(I)=0:Then
If R=1:Then
If dim(⌊X)=I:Then
(dim(⌊D)-1)→dim(⌊D)
(dim(⌊T)-1)→dim(⌊T)
(dim(⌊X)-1)→dim(⌊X)
(dim(⌊Y)-1)→dim(⌊Y)
1→T
End
If I=1 and T=0:Then
seq(⌊D(θ),θ,2,dim(⌊D))→⌊D
seq(⌊T(θ),θ,2,dim(⌊T))→⌊T
seq(⌊X(θ),θ,2,dim(⌊X))→⌊X
seq(⌊Y(θ),θ,2,dim(⌊Y))→⌊Y
1→T
End
If T=0:Then
augment(seq(⌊D(θ),θ,1,(I-1)),seq(⌊D(θ),θ,(I+1),dim(⌊D)))→⌊D
augment(seq(⌊T(θ),θ,1,(I-1)),seq(⌊T(θ),θ,(I+1),dim(⌊T)))→⌊T
augment(seq(⌊X(θ),θ,1,(I-1)),seq(⌊X(θ),θ,(I+1),dim(⌊X)))→⌊X
augment(seq(⌊Y(θ),θ,1,(I-1)),seq(⌊Y(θ),θ,(I+1),dim(⌊Y)))→⌊Y
End
End
Else
If L=1:Then
If dim(⌊X)=I:Then
(dim(⌊D)-1)→dim(⌊D)
(dim(⌊T)-1)→dim(⌊T)
(dim(⌊X)-1)→dim(⌊X)
(dim(⌊Y)-1)→dim(⌊Y)
1→T
End
If I=1 and T=0:Then
seq(⌊D(θ),θ,2,dim(⌊D))→⌊D
seq(⌊T(θ),θ,2,dim(⌊T))→⌊T
seq(⌊X(θ),θ,2,dim(⌊X))→⌊X
seq(⌊Y(θ),θ,2,dim(⌊Y))→⌊Y
1→T
End
If T=0:Then
augment(seq(⌊D(θ),θ,1,(I-1)),seq(⌊D(θ),θ,(I+1),dim(⌊D)))→⌊D
augment(seq(⌊T(θ),θ,1,(I-1)),seq(⌊T(θ),θ,(I+1),dim(⌊T)))→⌊T
augment(seq(⌊X(θ),θ,1,(I-1)),seq(⌊X(θ),θ,(I+1),dim(⌊X)))→⌊X
augment(seq(⌊Y(θ),θ,1,(I-1)),seq(⌊Y(θ),θ,(I+1),dim(⌊Y)))→⌊Y
End
End
End
End
End
For(I,1,dim(⌊X))
Output(⌊Y(I),(⌊X(I)-O),"-")
End
End
```

position

```
If G≠1:Then
[A](H,(G-1+O))→L
Else
1→L
End
If G≠20:Then
[A](H,(G+1+O))→R
Else
1→R
End
If H≠1:Then
[A]((H-1),(G+O))→U
Else
1→U
End
If H≠10:Then
[A]((H+1),(G+O))→D
Else
0→D
End
```

gamehud

```
For(C,21,26)
For(B,1,10)
Output(B,C,"*")
End
End
```

gametext

```
0→Q
1→X
1→S
Lbl B
0→dim(⌊X)
0→dim(⌊Y)
0→dim(⌊D)
0→dim(⌊T)
0→O
1→B
20→U
Lbl A
ClrHome
For(θ,1,10)
For(Q,B,U)
If [A](θ,Q)=1
Output(θ,(Q-O),"=")
If [A](θ,Q)=2
Output(θ,(Q-O),"Y")
End
End
prgmGAMEHUD
9→Y
Repeat 0=1
X→G
Y→H
prgmPOSITION
getKey→K
If K=24 and L≠1
Then
Output(Y,X," ")
X-1→X
1→P
End
If K=26 and R≠1
Then
Output(Y,X," ")
X+1→X
0→P
End
F-1→F
If K=25 and D=1:Then
Output(Y,X," ")
Y-1→Y
3→F
End
X→G
Y→H
prgmPOSITION
If D=0 and F≤0:Then
Output(Y,X," ")
Y+1→Y
End
If K=21:Then
X→⌊X(dim(⌊X)+1)
Y→⌊Y(dim(⌊Y)+1)
1→⌊T(dim(⌊T)+1)
P→⌊D(dim(⌊D)+1)
End
If K=24 and X=1 and S=2:Then
20→X
1→S
Goto B
End
Output(Y,X,"X")
If K=26 and X=20 and S=1:Then
2→S
21→B
40→U
20→O
1→X
Goto A
End
prgmGAMEBLET
End
```

I have parentheses for now for clarity, but after development. other optimizations are helpful though.