LASERCHS:  Kind of like chess.

Overview: Use mirrors and lasers to destroy the enemy king.  Each piece
can be rotated.  Plan out your strategy and fire!  Two players/one
calculator as of this point.

Pieces of the game:
There are 8 pieces.  They all can be rotated.
To see the difference between them, here they are:
(1= pixel on,  = pixel off)

1111   Blocker.  This line on the drawing is the mirrored edge. 
 11 
1111   Vulnerable to laser fire from three sides, but not where the mirror
1111   is.  (Mirror is on top, and the left, right, and bottom sides are 
vulnerable here.)  These pieces can crush others - simply place them on top of 
another piece. 

 1     Mirror blocks.  The diagonal line is the mirror.  
  1
11 1   Vulnerable from the two sides without a mirror. (Here, left and
11     bottom.)

       Horizontal (Vertical) Mirror.  Indestructible.  Bounces laser
1111   fire straight back, or if rotated so it doesn't oppose laser beam,
1111   allows the beam to continue on unchanged.


1111   Beam Splitter.  When a beam hits the vertex of the triangle, it is
 11    split into two beams, going opposite ways.  If the sides of the 
       triangle are hit, the splitter functions as a mirror except when  
       the back (side opposite the vertex) is hit.  If the back is hit 
       with laser fire, the piece is destroyed.

1      Diagonal Mirror.  Indestructible.  Reflects laser fire at a 90
 1     degree angle.
  1
   1

1111   Hypercube.  When placed over a piece, the piece being moved onto
1  1   is shifted into hyperspace, to reappear somewhere random on the 
1  1   board.  This piece is transparent to laser fire.
1111

1  1   King.  Safeguard him at all times.  When he's gone, so are you.
1111   Kings can destroy pieces by stomping on them.  Vulnerable 
1111   everywhere to lasers.
1111

 11    Laser.  Shoots a beam on command.  Vulnerable everywhere to laser
 11    fire.  The beam comes from the narrow end.
1111  
1111

You start off each turn with two moves.  The two small boxes on the 
middle of the left edge of the screen show how many moves you have left-
if both are filled, you have 2 moves, if one is filled, you have 1 move.
On the right edge of the screen are two large boxes.  One displays whose
turn is currently is, and the other displays the number of the player who
owns the piece the selector box is on.  On the left edge of the screen at
the bottom is a box.  This box lets you know if the computer is thinking
or not.  When the computer is working, an exclamation point (!) will 
appear in the box.  When the computer is waiting for input, a question 
mark (?) is in the box.  On the left edge of the screen are also the 
fire and rotate buttons, and the quit area, in addition to the small 
indicators of how many moves the player has left.  To get to the buttons 
on the left, move the selector box off the board.  It will automatically 
change to an arrow that can be moved between the buttons and the closing 
area.  To get the selector box back, move the arrow onto the board.  The
action button that does everything in this program is '2nd'.  
     To do anything with a piece, it must first be selected.  
To select a piece, move the selector box on to one of your pieces with 
the arrow keys and press '2nd'.  A ring around the piece will confirm 
selection.  To move a selected piece, move to the spot where you wish 
it to go and press '2nd'.  The new spot must be within as many spaces 
as you have moves left.  
To rotate a piece, after selecting the piece you want rotated, move off
the board until you get the arrow on the large button marked 'R'.  Press 
'2nd' while on this button to rotate the piece.  When finished, move back
to the board.  Moving back to the board after rotating finishes the 
rotation of your piece, and causes one of your moves to be used.
To fire the laser, move to the button marked 'F'.  Press '2nd', and watch
the fireworks.  Do not select the laser before firing.  Firing ends your turn.
To quit/save during a game, move to the closing area at the top left of the 
screen and press '2nd'.
When a king is destroyed, the game is over.  Have fun!

Uses subroutines /theta/laschfi,  /theta/laschsq,  /theta/box,  /theta/range,
/theta/laschpc.


\COMMENT=Program file dated 03/12/97, 18:09
\NAME=LASERCHS
\FILE=C:\BRYAN\TI\UPLOAD\LASERCHS.82P
:0\->\S
:prgm\@\RANGE
:ClrDraw
:ClrHome
:9\->\A
:53\->\B
:0\->\C
:62\->\D
:prgm\@\BOX
:Line(3,58,6,58
:For(N,0,57,7
:Line(19,N+3,75,N+3
:Line(N+19,3,N+19,59
:End
:Circle(9,43,7
:Circle(9,18,7
:Line(76,31,94,31
:Text(16,8,"F
:Text(41,8,"R
:Text(2,77,"TURN
:Text(32,77,"PIECE
:4\->\A:30\->\B:6\->\C:32\->\D:prgm\@\BOX
:12\->\A:14\->\C:prgm\@\BOX
:0\->\B:8\->\D:5\->\A:13\->\C:prgm\@\BOX
:Text(55,9,"!
:StorePic Pic6
:Lbl U
:Menu("LASERCHESS V2.14","NEW GAME",1,"RESUME GAME",2
:Lbl 1
:ClrDraw:RecallPic Pic6
:[[93,183,0,0,0,0,610,434][123,183,0,0,0,0,610,222][47,93,0,0,0,0,434,2\#\
46][53,185,0,0,0,0,602,826][177,129,0,0,0,0,370,106][123,93,0,0,0,0,434\#\
,94][111,671,0,0,0,0,854,246][93,671,0,0,0,0,854,434]]\->\[A]
:For(A,1,8
:1\->\B:prgm\@\LASCHPC
:2\->\B:prgm\@\LASCHPC
:7\->\B:prgm\@\LASCHPC
:8\->\B:prgm\@\LASCHPC
:End
:15\->\V
:Lbl D
:1\->\P:2\->\H:1\->\F:1\->\G
:Lbl E
:prgm\@\LASCHSQ
:If V\<>\15:Goto W
:Lbl F
:2\->\P:2\->\H:1\->\F:8\->\G
:prgm\@\LASCHSQ
:If V\<>\15:Goto W
:Goto D
:Lbl W
:ClrDraw
:If V=0:Goto G
:If V=1:Then:ClrHome:Output(4,7,"DRAW"):Pause :Goto L:End
:Text(29,3,"PLAYER
:Text(29,71,"WINS!!
:If V=3:{1,1,1,0,1,0,0,1,0,1,1,0,0,1,0}\->\\L6\
:If V=5:{1,1,1,1,0,0,0,1,0,0,0,1,1,1,0}\->\\L6\
:For(A,0,14
:int (A/3)\->\T
:A-3T\->\S
:If \L6\(A+1)=1:Then
:For(C,12T+1,12T+12
:Line(12S+29,C,12S+40,C
:End
:End
:End
:Pause 
:Lbl L
:ClrList \L5\,\L6\
:{1,1}\->\dim [A]
:0\->\[A](1,1)
:ClrHome
:Output(3,4,"LASERCHESS
:Output(5,1,"BRYAN CATANZARO
:Output(6,13,"1996
:Output(8,15,"bc
:Return
:Lbl 2
:0\->\A:1\->\B:log \pi\\->\\@\:prgmPICDRIVE:0\->\\@\
:If D=\(-)\1:Goto U
:0\->\W
:{8,8}\->\dim [A]
:ClrHome:Output(2,2,"LASER CHESS IS
:Output(3,5,"LOADING.
:Output(5,4,"<
:Output(5,13,">
:Output(7,7,"PERCENT
:For(I,1,8
:For(J,1,8
:0\->\B
:For(K,10,0,\(-)\1
:pxl-Test(D,W)2^K+B\->\B
:W+1\->\W:If W=95:Then:0\->\W:D+1\->\D:End
:End
:B\->\[A](I,J
:Output(7,4,int (100(8I-8+J)/64
:End
:Output(5,I+4,"-
:End
:1+pxl-Test(D,W)\->\P
:W+1\->\W
:1+pxl-Test(D,W)\->\H
:ClrDraw:RecallPic Pic6
:For(A,1,8
:For(B,1,8
:If [A](A,B)\<>\0
:prgm\@\LASCHPC
:End
:End
:1\->\F:7P-6\->\G:15\->\V
:If P=1:Goto E
:If P=2:Goto F
:Lbl G
:Menu("LASERCHESS V2.14","SAVE GAME",H,"QUIT",L
:Lbl H
:H\->\Z
:8\->\A:1\->\B:log \pi\\->\\@\:prgmPICDRIVE
:0\->\W:0\->\\@\
:For(I,1,8
:For(J,1,8
:[A](I,J)\->\S
:For(K,10,0,\(-)\1
:If S\>=\2^K:Then:Pxl-On(D,W):S-2^K\->\S:End
:W+1\->\W:If W=95:Then:0\->\W:D+1\->\D:End
:End
:End
:End
:If P-1:Pxl-On(D,W
:W+1\->\W
:If Z-1:Pxl-On(D,W
:\(-)\1\->\A
:prgmPICDRIVE
:Goto L
\STOP82\
\START82\
\COMMENT=Program file dated 03/12/97, 18:12
\NAME=\@\BOX
\FILE=C:\BRYAN\TI\UPLOAD\ZBOX.82P
:Line(A,B,A,D
:Line(A,D,C,D
:Line(C,D,C,B
:Line(C,B,A,B
\STOP82\
\START82\
\COMMENT=Program file dated 03/12/97, 18:12
\NAME=\@\LASCHFI
\FILE=C:\BRYAN\TI\UPLOAD\ZLASCHFI.82P
:[A](A,B)\->\D:0\->\W
:If D/47=int (D/47):Goto Y
:If D/3=int (D/3):1\->\O
:If D/5=int (D/5):2\->\O
:If D/7=int (D/7):3\->\O
:If D/11=int (D/11):4\->\O
:If D/31=int (D/31):Then
:If \@\=1:Then
:If O=1:Then
:3\->\\@\
:1\->\W
:5\->\Z
:Else
:0\->\\@\
:End
:End
:If \@\=2:Then
:If O=2:Then
:4\->\\@\
:1\->\W
:6\->\Z
:Else
:0\->\\@\
:End
:End
:If \@\=3 and W=0:Then
:If O=3:Then
:1\->\\@\
:7\->\Z
:Else
:0\->\\@\
:End
:End
:If \@\=4 and W=0:Then
:If O=4:Then
:2\->\\@\
:8\->\Z
:Else
:0\->\\@\
:End
:End
:End
:If D/37=int (D/37)
:Then
:If O=1 or O=3:Then
:If \@\=1 or \@\=3:13\->\Z
:If \@\=2:Then:4\->\\@\:1\->\W:6\->\Z:End
:If \@\=4 and W=0:Then:2\->\\@\:8\->\Z:End
:Else
:If \@\=2 or \@\=4:14\->\Z
:If \@\=1:Then:3\->\\@\:1\->\W:5\->\Z:End
:If \@\=3 and W=0:Then:1\->\\@\:7\->\Z:End
:End
:End
:If D/41=int (D/41):Then
:If O=1 or O=3:Then
:If \@\=1:Then:4\->\\@\:1\->\W:2\->\Z:End
:If \@\=2:Then:3\->\\@\:1\->\W:2\->\Z:End
:If \@\=3 and W=0:Then:2\->\\@\:4\->\Z:End
:If \@\=4 and W=0:Then:1\->\\@\:4\->\Z:End
:Else
:If \@\=1:Then:2\->\\@\:1\->\W:1\->\Z:End
:If \@\=2 and W=0:Then:1\->\\@\:3\->\Z:End
:If \@\=3:Then:4\->\\@\:1\->\W:3\->\Z:End
:If \@\=4 and W=0:Then:3\->\\@\:1\->\Z:End
:End
:End
:If D/53=int (D/53) or D/59=int (D/59):0\->\\@\
:If D/61=int (D/61):Then
:If O=1:Then
:If \@\=4 or \@\=3:0\->\\@\
:If \@\=1 or \@\=2:2\->\Z
:If \@\=2:3\->\\@\
:If \@\=1:4\->\\@\
:End
:If O=2:Then
:If \@\=1 or \@\=4:0\->\\@\
:If \@\=3 or \@\=2:3\->\Z
:If \@\=3:4\->\\@\
:If \@\=2:1\->\\@\
:End
:If O=3:Then
:If \@\=1 or \@\=2:0\->\\@\
:If \@\=3 or \@\=4:4\->\Z
:If \@\=3:2\->\\@\
:If \@\=4:1\->\\@\
:End
:If O=4:Then
:If \@\=2 or \@\=3:0\->\\@\
:If \@\=1 or \@\=4:1\->\Z
:If \@\=1:2\->\\@\
:If \@\=4:3\->\\@\
:End
:End
:If D/43=int (D/43):Then
:dim \L6\\->\L
:If O=1:Then
:If \@\=1:0\->\\@\
:If \@\=2:3\->\Z
:If \@\=4:4\->\Z
:If \@\=2 or \@\=4:1\->\\@\
:If \@\=3:Then
:9\->\Z
:4\->\\L6\(L+1
:A+1\->\\L6\(L+2
:B\->\\L6\(L+3
:2\->\\@\
:End
:End
:If O=2:Then
:If \@\=2:0\->\\@\
:If \@\=3:4\->\Z
:If \@\=1:1\->\Z
:If \@\=3 or \@\=1:2\->\\@\
:If \@\=4:Then
:10\->\Z
:1\->\\L6\(L+1
:A\->\\L6\(L+2
:B-1\->\\L6\(L+3
:3\->\\@\
:End
:End
:If O=3:Then
:If \@\=3:0\->\\@\
:If \@\=2:2\->\Z
:If \@\=4:1\->\Z
:If \@\=2 or \@\=4:3\->\\@\
:If \@\=1:Then
:11\->\Z
:4\->\\L6\(L+1
:A+1\->\\L6\(L+2
:B\->\\L6\(L+3
:2\->\\@\
:End
:End
:If O=4:Then
:If \@\=4:0\->\\@\
:If \@\=1:2\->\Z
:If \@\=3:3\->\Z
:If \@\=1 or \@\=3:4\->\\@\
:If \@\=2:Then
:12\->\Z
:1\->\\L6\(L+1
:A\->\\L6\(L+2
:B-1\->\\L6\(L+3
:3\->\\@\
:End
:End
:End
:If \@\=0:Then:For(X,7A+14,7A+17
:Line(X,7B+1,X,7B-2
:End
:For(X,7A+14,7A+17
:Line(X,7B+1,X,7B-2,0
:End
:20rand\->\X
:20rand\->\C
:Line(7A+15-X,7B-C,7A+15+X,7B+C
:20rand\->\X
:20rand\->\C
:Line(7A+15-X,7B+C,7A+15+X,7B-C
:0\->\[A](A,B
:End
:If \@\=0:20\->\Z
:If Z=1:Then
:Line(7A+15,7B+2,7A+15,7B-1
:Line(7A+16,7B+2,7A+16,7B
:Line(7A+13,7B,7A+14,7B
:Line(7A+13,7B-1,7A+14,7B-1
:End
:If Z=2:Then
:Line(7A+15,7B+2,7A+15,7B
:Line(7A+16,7B+2,7A+16,7B-1
:Line(7A+17,7B,7A+18,7B
:Line(7A+17,7B-1,7A+18,7B-1
:End
:If Z=3:Then
:Line(7A+16,7B,7A+18,7B
:Line(7A+15,7B-1,7A+18,7B-1
:Line(7A+15,7B-2,7A+16,7B-2
:Line(7A+15,7B-3,7A+16,7B-3
:End
:If Z=4:Then
:Line(7A+13,7B,7A+15,7B
:Line(7A+13,7B-1,7A+16,7B-1
:Line(7A+15,7B-2,7A+16,7B-2
:Line(7A+15,7B-3,7A+16,7B-3
:End
:If Z=5:Then
:Line(7A+15,7B+2,7A+15,7B
:Line(7A+16,7B+2,7A+16,7B
:End
:If Z=6:Then
:Line(7A+16,7B,7A+18,7B
:Line(7A+16,7B-1,7A+18,7B-1
:End
:If Z=7:Then
:Line(7A+15,7B-1,7A+15,7B-3
:Line(7A+16,7B-1,7A+16,7B-3
:End
:If Z=8:Then
:Line(7A+13,7B,7A+15,7B
:Line(7A+13,7B-1,7A+15,7B-1
:End
:If Z=9:Then
:Line(7A+13,7B,7A+18,7B
:Line(7A+13,7B-1,7A+18,7B-1
:Line(7A+15,7B-2,7A+16,7B-2
:Line(7A+15,7B-3,7A+16,7B-3
:End
:If Z=10:Then
:Line(7A+15,7B-3,7A+15,7B+2
:Line(7A+16,7B-3,7A+16,7B+2
:Line(7A+13,7B-1,7A+13,7B
:Line(7A+14,7B-1,7A+14,7B
:End
:If Z=11:Then
:Line(7A+13,7B,7A+18,7B
:Line(7A+13,7B-1,7A+18,7B-1
:Line(7A+15,7B+2,7A+16,7B+2
:Line(7A+15,7B+1,7A+16,7B+1
:End
:If Z=12:Then
:Line(7A+15,7B+2,7A+15,7B-3
:Line(7A+16,7B+2,7A+16,7B-3
:Line(7A+17,7B,7A+17,7B-1
:Line(7A+18,7B,7A+18,7B-1
:End
:If Z=13:Then
:Line(7A+15,7B+2,7A+15,7B-3
:Line(7A+16,7B+2,7A+16,7B-3
:End
:If Z=14:Then
:Line(7A+13,7B,7A+18,7B
:Line(7A+13,7B-1,7A+18,7B-1
:End
:Return
:Lbl Y
:If \@\=1 or \@\=3:Then
:7A+15\->\E:7A+16\->\F
:Line(E,7B+2,E,7B-3
:Line(F,7B+2,F,7B-3
:End
:If \@\=2 or \@\=4
:Then
:7B\->\E:7B-1\->\F
:Line(7A+18,E,7A+13,E
:Line(7A+18,F,7A+13,F
:End
\STOP82\
\START82\
\COMMENT=Program file dated 03/12/97, 18:12
\NAME=\@\LASCHPC
\FILE=C:\BRYAN\TI\UPLOAD\ZLASCHPC.82P
:[A](A,B)\->\D
:7A+14\->\X
:7B-2\->\C
:If D/3=int (D/3
:1\->\O
:If D/5=int (D/5
:2\->\O
:If D/7=int (D/7
:3\->\O
:If D/11=int (D/11
:4\->\O
:If D/31=int (D/31
:Then
:Line(X,C,X+3,C
:Line(X,C+1,X+3,C+1
:Line(X,C+2,X+3,C+2
:Line(X,C+3,X+3,C+3
:If O=1
:Then
:Pt-Off(X,C+2
:Pt-Off(X+3,C+2
:End
:If O=2
:Then
:Pt-Off(X+2,C+3
:Pt-Off(X+2,C
:End
:If O=3
:Then
:Pt-Off(X,C+1
:Pt-Off(X+3,C+1
:End
:If O=4
:Then
:Pt-Off(X+1,C+3
:Pt-Off(X+1,C
:End
:End
:If D/61=int (D/61
:Then
:If O=1
:Then
:Line(X,C,X,C+1
:Line(X+1,C,X+1,C+1
:Line(X+1,C+3,X+3,C+1
:End
:If O=2
:Then
:Line(X,C+3,X,C+2
:Line(X+1,C+3,X+1,C+2
:Line(X+3,C+2,X+1,C
:End
:If O=3
:Then
:Line(X+2,C+3,X+2,C+2
:Line(X+3,C+3,X+3,C+2
:Line(X,C+2,X+2,C
:End
:If O=4
:Then
:Line(X+2,C,X+2,C+1
:Line(X+3,C,X+3,C+1
:Line(X,C+1,X+2,C+3
:End
:End
:If D/47=int (D/47
:Then
:Line(X,C,X+3,C
:Line(X+3,C,X+3,C+3
:Line(X+3,C+3,X,C+3
:Line(X,C+3,X,C
:End
:If D/53=int (D/53
:Then
:Line(X,C,X+3,C
:Line(X,C+1,X+3,C+1
:Line(X,C+2,X+3,C+2
:Pt-On(X,C+3
:Pt-On(X+3,C+3
:End
:If D/59=int (D/59
:Then
:Line(X,C,X,C+3
:Line(X+1,C,X+1,C+3
:Line(X+2,C,X+2,C+3
:Line(X+3,C,X+3,C+3
:If O=1
:Then
:Line(X,C+3,X,C+2,0
:Line(X+3,C+3,X+3,C+2,0
:End
:If O=2
:Then
:Line(X+2,C+3,X+3,C+3,0
:Line(X+2,C,X+3,C,0
:End
:If O=3
:Then
:Line(X,C+1,X,C,0
:Line(X+3,C+1,X+3,C,0
:End
:If O=4
:Then
:Line(X,C+3,X+1,C+3,0
:Line(X,C,X+1,C,0
:End
:End
:If D/37=int (D/37
:Then
:If O=1 or O=3
:Then
:Line(X+1,C+3,X+1,C
:Line(X+2,C+3,X+2,C
:End
:If O=2 or O=4
:Then
:Line(X,C+1,X+3,C+1
:Line(X,C+2,X+3,C+2
:End
:End
:If D/41=int (D/41
:Then
:If O=1 or O=3
:Line(X,C+3,X+3,C
:If O=2 or O=4
:Line(X,C,X+3,C+3
:End
:If D/43=int (D/43
:Then
:If O=1
:Then
:Line(X,C+3,X+3,C+3
:Line(X+1,C+2,X+2,C+2
:End
:If O=2
:Then
:Line(X+2,C+1,X+2,C+2
:Line(X+3,C+3,X+3,C
:End
:If O=3
:Then
:Line(X,C,X+3,C
:Line(X+1,C+1,X+2,C+1
:End
:If O=4
:Then
:Line(X,C+3,X,C
:Line(X+1,C+2,X+1,C+1
:End
:End
\STOP82\
\START82\
\COMMENT=Program file dated 03/12/97, 18:12
\NAME=\@\LASCHSQ
\FILE=C:\BRYAN\TI\UPLOAD\ZLASCHSQ.82P
:Lbl A
:If F>8 or G<1 or G>8:0\->\F
:If F<1:Goto N
:If H=0:Return
:Pt-On(5,31
:If H=2:Then:Pt-On(13,31):Else:Pt-Off(13,31):End
:[A](F,G)\->\O
:If O/2=int (O/2):Then:2\->\M:Else:1\->\M:End
:Text(15,84,P
:Text(46,84,M
:If O=0:Text(46,84,"   
:7F+13\->\A
:7G-3\->\B
:7F+18\->\C
:7G+2\->\D
:prgm\@\BOX
:Text(55,8,"?
:getKey\->\N
:While N=0
:getKey\->\N
:End
:Text(55,8," ! 
:Lbl B
:Line(A,B,C,B,0
:Line(C,B,C,D,0
:Line(C,D,A,D,0
:Line(A,D,A,B,0
:If N=11:Then:\(-)\2\->\F:Goto N:End
:If N=24:F-1\->\F
:If N=25:G+1\->\G
:If N=26:F+1\->\F
:If N=34:G-1\->\G
:If N>23 and N<27 or N=34:Goto A
:0\->\E
:If N=21
:Then
:If S\<>\0:Then
:abs (S-F)+abs (T-G)\->\K
:If K\<=\H:Then
:If [A](F,G)\<>\0 and K\<>\0:Then
:[A](S,T)\->\D
:If D/53=int (D/53) or D/31=int (D/31):Then
:[A](F,G)\->\U
:If U/53=int (U/53) and U\<>\0:Then
:If U/2=int (U/2):Then:2\->\M:Else:1\->\M:End
:If M=1:5\->\V
:If M=2:3\->\V
:Return
:End
:0\->\[A](F,G
:Line(7A+14,7B-2,7A+17,7B-2,0
:Line(7A+14,7B-1,7A+17,7B-1,0
:Line(7A+14,7B,7A+17,7B,0
:Line(7A+14,7B+1,7A+17,7B+1,0
:End
:If D/47=int (D/47):Then
:Line(7S+14,7T-2,7S+17,7T-2,0
:Line(7S+14,7T-1,7S+17,7T-1,0
:Line(7S+14,7T,7S+17,7T,0
:Line(7S+14,7T+1,7S+17,7T+1,0
:Line(7S+13,7T+4,7S+18,7T+4,0
:Line(7S+20,7T+2,7S+20,7T-3,0
:Line(7S+13,7T-5,7S+18,7T-5,0
:Line(7S+11,7T+2,7S+11,7T-3,0
:Pt-Off(7S+11,7T+4
:Pt-Off(7S+20,7T+4
:Pt-Off(7S+11,7T-5
:Pt-Off(7S+20,7T-5
:If S=1:Line(18,7T-4,18,7T+3,0
:If S=8:Line(76,7T-4,76,7T+3,0
:If T=1:Line(7S+12,2,7S+19,2,0
:If T=8:Line(7S+12,60,7S+19,60,0
:Line(7F+13,7G-1,7F+17,7G-1,0
:Line(7F+13,7G,7F+17,7G,0
:[A](S,T)\->\E
:0\->\[A](S,T
:F\->\S
:G\->\T
:Lbl D
:int 9rand\->\F
:int 9rand\->\G
:If F=0 or G=9 or G=0 or G=9:Goto D
:If [A](F,G)\<>\0:Goto D
:End
:End
:If [A](F,G)=0:Then
:[A](S,T)\->\[A](F,G)
:0\->\[A](S,T)
:Line(7S+14,7T-2,7S+17,7T-2,0
:Line(7S+14,7T-1,7S+17,7T-1,0
:Line(7S+14,7T,7S+17,7T,0
:Line(7S+14,7T+1,7S+17,7T+1,0
:F\->\A
:G\->\B
:H-K\->\H
:prgm\@\LASCHPC
:End
:End
:If E\<>\0:Then
:E\->\[A](S,T
:7S+14\->\A
:7T-2\->\B
:7S+17\->\C
:7T+1\->\D
:prgm\@\BOX
:0\->\S
:Else
:Line(7S+13,7T+4,7S+18,7T+4,0
:Line(7S+20,7T+2,7S+20,7T-3,0
:Line(7S+13,7T-5,7S+18,7T-5,0
:Line(7S+11,7T+2,7S+11,7T-3,0
:Pt-Off(7S+11,7T+4
:Pt-Off(7S+20,7T+4
:Pt-Off(7S+11,7T-5
:Pt-Off(7S+20,7T-5
:If S=1:Line(18,7T-4,18,7T+3,0
:If S=8:Line(76,7T-4,76,7T+3,0
:If T=1:Line(7S+12,2,7S+19,2,0
:If T=8:Line(7S+12,60,7S+19,60,0
:0\->\S
:1\->\E
:End
:End
:[A](F,G)\->\O
:If O/2=int (O/2):Then:2\->\M:Else:1\->\M:End
:If E=0 and S=0 and O\<>\0 and M=P
:Then
:F\->\S
:G\->\T
:A-2\->\A
:B-2\->\B
:C+2\->\C
:D+2\->\D
:prgm\@\BOX
:End
:End
:If H>0:Goto A
:Return
:Lbl N
:If F=1:Then:If G=0:1\->\G
:If G=9:8\->\G
:End
:If F=1:Goto A
:F-1\->\I
:\(-)\3.5I\^2\-10.5I+5\->\X
:\(-)\6I\^2\-43I-18\->\C
:Line(X,C,X,C-2
:Line(X,C,X+2,C
:Line(X,C,X+2,C-2
:Text(55,8,"?
:getKey\->\N
:While N=0:getKey\->\N:End
:Text(55,8," ! 
:Line(X,C,X,C-2,0
:Line(X,C,X+2,C,0
:Line(X,C,X+2,C-2,0
:If N=11:\(-)\2\->\F
:If N=24 or N=25:F-1\->\F
:If N=26 or N=34:F+1\->\F
:If F=\(-)\3:\(-)\2\->\F
:If F=1 and R=1:Then:H-1\->\H
:Line(7S+13,7T+4,7S+18,7T+4,0
:Line(7S+20,7T+2,7S+20,7T-3,0
:Line(7S+13,7T-5,7S+18,7T-5,0
:Line(7S+11,7T+2,7S+11,7T-3,0
:Pt-Off(7S+11,7T+4
:Pt-Off(7S+20,7T+4
:Pt-Off(7S+11,7T-5
:Pt-Off(7S+20,7T-5
:If S=1:Line(18,7T-4,18,7T+3,0
:If S=8:Line(76,7T-4,76,7T+3,0
:If T=1:Line(7S+12,2,7S+19,2,0
:If T=8:Line(7S+12,60,7S+19,60,0
:0\->\S
:End
:0\->\R
:If N=21:Then
:If F=0:Goto R
:If F=\(-)\1:Goto F
:If F=\(-)\2:Goto Q
:End
:Goto N
:Lbl R
:If S=0:Goto N
:[A](S,T)\->\D
:0\->\F
:If D/3=int (D/3):Then:D/3\->\D:5D\->\[A](S,T):1\->\F:End
:If D/5=int (D/5) and F=0:Then:D/5\->\D:7D\->\[A](S,T):1\->\F:End
:If D/7=int (D/7) and F=0:Then:D/7\->\D:11D\->\[A](S,T):1\->\F:End
:If D/11=int (D/11) and F=0:Then:D/11\->\D:3D\->\[A](S,T):End
:Line(7S+14,7T-2,7S+17,7T-2,0
:Line(7S+14,7T-1,7S+17,7T-1,0
:Line(7S+14,7T,7S+17,7T,0
:Line(7S+14,7T+1,7S+17,7T+1,0
:S\->\A
:T\->\B
:prgm\@\LASCHPC
:0\->\F
:1\->\R
:Goto N
:Lbl Q
:0\->\V
:Return
:Lbl F
:0\->\Q
:For(F,1,8
:For(G,1,8
:[A](F,G)\->\D
:If D=0:.1\->\D
:If D/2=int (D/2) and P=2:97D\->\D
:If D/2\<>\int (D/2) and P=1:97D\->\D
:If D/97=int (D/97) and D/59=int (D/59):Then:G\->\R:F\->\Q:End
:End
:End
:If Q=0:Goto A
:[A](Q,R)\->\D
:If D/3=int (D/3):3\->\\@\
:If D/5=int (D/5):4\->\\@\
:If D/7=int (D/7):1\->\\@\
:If D/11=int (D/11):2\->\\@\
:If \@\=1:R-1\->\R
:If \@\=2:Q-1\->\Q
:If \@\=3:R+1\->\R
:If \@\=4:Q+1\->\Q
:{\@\,Q,R}\->\\L6\
:Lbl G
:dim \L6\\->\L
:For(J,1,L/3
:\L6\(3J-2)\->\\@\
:\L6\(3J-1)\->\A
:\L6\(3J)\->\B
:If \@\=0:Goto X
:prgm\@\LASCHFI
:If \@\=1:B-1\->\B
:If \@\=2:A-1\->\A
:If \@\=3:B+1\->\B
:If \@\=4:A+1\->\A
:If A=0 or A=9 or B=0 or B=9:0\->\\@\
:\@\\->\\L6\(3J-2
:A\->\\L6\(3J-1
:B\->\\L6\(3J
:Lbl X
:End
:0\->\Z
:For(J,1,dim \L6\,3
:\L6\(J)+Z\->\Z
:End
:If Z=0:Goto K
:Goto G
:Lbl K
:ClrDraw
:RecallPic Pic6
:Text(55,8," ! 
:1\->\V
:For(F,1,8
:For(G,1,8
:[A](F,G)\->\D
:If D\<>\0:Then:F\->\A:G\->\B:prgm\@\LASCHPC:End
:If D/2=int (D/2):Then:2\->\M:Else:1\->\M:End
:If D/53=int (D/53) and D\<>\0:Then
:If M=1:3V\->\V
:If M=2:5V\->\V
:End
:End
:End
\STOP82\
\START82\
\COMMENT=Program file dated 03/12/97, 18:12
\NAME=\@\RANGE
\FILE=C:\BRYAN\TI\UPLOAD\ZRANGE.82P
:FullScreen
:FnOff :PlotsOff :AxesOff:Func:0\->\Xmin:94\->\Xmax:0\->\Ymin:62\->\Yma\#\
x
\STOP82\
