That's a pretty cool program!
FnOff :PlotsOff :ClrDraw:AxesOff:GridOff:0→Xmin:94→Xmax:0→Ymin:62→Ymax
60→D
40→E
Repeat A=105
Repeat A=105 or A=21
Line(40,40,D,E
Line(50,20,D,E
Repeat max(Ans={21,24,34,25,26,105
getKey→A
End
D+(Ans=26)-(Ans=24→D
E+(A=25)-(A=34→E
End
If A=21
Then
Repeat A=105 or A=21
Line(40,40,D,E,0
Line(50,20,D,E,0
Repeat max(Ans={21,24,34,25,26,105
getKey→A
End
D+(Ans=26)-(Ans=24→D
E+(A=25)-(A=34→E
End
End
End
I optimized it a bit, copy pasted it to another loop for erasing, then put them both in a loop. Use [2nd] to toggle.
There's a more optimized way to do this, though.
FnOff :PlotsOff :ClrDraw:AxesOff:GridOff:0→Xmin:94→Xmax:0→Ymin:62→Ymax
60→D
40→E
1→F
Repeat A=105
Line(40,40,D,E,F
Line(50,20,D,E,F
Repeat max(Ans={21,24,34,25,26,105
getKey→A
End
D+(Ans=26)-(Ans=24→D
E+(A=25)-(A=34→E
If A=21 and F
DelVar F
If A=21 and not(F
1→F
End
This one uses F as a toggle, saving many bytes. (I'm not sure about the way I toggle F; there's probably a better way…)