Regarding the subject, the LURD code. Everyone's used it in one time in their lives. But, understand that the code can be optimised.
Your mission:
1) Optimise the code and make it in as little lines as possible.
Code: Select all
ClrHome
1->A
1->B
0->C
0->D
0->K
Repeat 0
Output(A,B,"X
A->C
B->D
While K=0
getKey->K
End
If K=24
Then
If B>1
Then
B-1->B
End
End
If K=25
Then
If A>1
Then
A-1->A
End
End
If K=26
Then
If B<16
Then
B+1->B
End
End
If K=34
Then
If A<8
Then
A+1->A
End
End
Output(C,D," (1 space)
End