TRON
Tron is a simple game where you draw a line on a playing field. The
object of the game is to make the calc crash, but if you crash first you
lose. The arrow keys change you direction. If you don't press any
keys, you will continue going in the last direction. When you start
Tron, you can choose if there is static or not. If you choose stacic,
there are dots that must be avoided. You start on a random position at
top going down, and the calc starts at a random position at the bottom
going up.
Calculator's logic has been rewritten to hopefully speed up game play.
This is free software released under the GNU General Public License.
There is no warranty for this software.
Copyright 1995 Mike Tilstra
\START82\
\COMMENT=Tron 1.1.1 By Mike Tilstra
\NAME=TRON
\FILE=TRON.82p
PlotsOff
FnOff :AxesOff
ClrDraw
Line(Xmin,Ymin,Xmin,Ymax)
Line(Xmin,Ymin,Xmax,Ymin)
Line(Xmax,Ymin,Xmax,Ymax)
Line(Xmin,Ymax,Xmax,Ymax)
Menu("TRON 1.1.1","CLEAR",X,"STATIC",Y)
Lbl Y
For(Z,1,20)
int 94rand+1\->\X
int 62rand+1\->\Y
Pxl-On(Y,X)
End
Lbl X
0\->\B:1\->\C:0\->\P
47\->\D:0\->\E
0\->\\@\:\(-)\1\->\Z
47\->\V:62\->\U
int 92rand+1\->\D
int 30rand+1\->\E
int 92rand+1\->\V
int 30rand+30\->\U
Lbl 1
getKey\->\K
If K=26
Then
1\->\B:0\->\C
End
If K=34
Then
1\->\C:0\->\B
End
If K=24
Then
\(-)\1\->\B:0\->\C
End
If K=25
Then
\(-)\1\->\C:0\->\B
End
If K=21
Pause
D+B\->\D
E+C\->\E
pxl-Test(E,D)\->\F
If F=1
Then
Text(2,2,"HA HA HA YOU CRASHED")
Pause
ClrDraw
ClrHome
Return
Stop
End
If P<30
P+1\->\P
If P=30
Then
int 2rand+1\->\\@\
If \@\=2
\(-)\1\->\\@\
0\->\Z
0\->\P
End
If pxl-Test(U,V+\@\)=1:Then
int 2rand+1\->\Z
If Z=2
\(-)\1\->\Z
0\->\\@\
If pxl-Test(U+Z,V)=1
\(-)\Z\->\Z
End
If pxl-Test(U+Z,V)=1:Then
int 2rand+1\->\\@\
If \@\=2
\(-)\1\->\\@\
0\->\Z
If pxl-Test(U,V+\@\)=1
\(-)\\@\\->\\@\
End
\@\+V\->\V
Z+U\->\U
pxl-Test(U,V)\->\F
If F=1
Then
Text(2,2,"YOU WIN CALC CRASHED")
Pause
ClrDraw
ClrHome
Return
Stop
End
Pxl-On(U,V)
Pxl-On(E,D)
Goto 1
Stop
MIKE TILSTRA
\STOP82\