TBomb

   In this game you have one live bomb that you must place in such a
   position that it will blow up as many other bombs as possible in a chain
   reaction.  When a bomb blows, it ignights the ones next to it, causing
   them to blow.  You must place your bomb fast, because when it reaches
   zero, it goes, where ever it is.

   You use the arrow keys to move the cursor, which is a blinking number.
   The value of the cursor is how long you have until it blows.  If you
   want to blow it earlier, press ENTER.  After all possible bombs are
   blown, the percentage cleared is shown.

   ===
    Copyright 1995, Micheal Conrad Tilstra, Tadpol.
    Copyright 1995, Arlin Sandbulte
    All rights reserved.
    
    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions
    are met:
    
    1. Redistributions of source code must retain the above copyright
       notice, this list of conditions, and the following disclaimer.
    
    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions, and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
    
    3. The name of the author may not be used to endorse or promote products
       derived from this software without specific prior written permission.
    
    THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
    AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    
   ===

\START82\
\COMMENT=TBomb 1.1.1 by Mike Tilstra MODby Arlin 
\NAME=TBOMB
\FILE=TBomb.82p
ClrHome
Output(1,5,"TIMEBOMB")
Output(2,6,"1.1.1")
Output(5,2,"MIKE TILSTRA")
Output(4,2,"BY")
Output(7,2,"MODIFIED BY")
Output(8,2,"ARLIN SANDBULTE")
Pause 
getKey
{10,18}\->\dim [A]
Fill(0,[A]
35\->\D
0\->\E:9\->\F
ClrHome
For(\@\,1,D
int 16rand+2\->\X
int 8rand+2\->\Y
If [A](Y,X)=0
Then
Output(Y-1,X-1,"O"
1\->\[A](Y,X
Else
\@\-1\->\\@\
End
End
getKey
0\->\G:4\->\B:8\->\A
While G=0
getKey\->\K
If K=24
A-1\->\A
If K=26
A+1\->\A
If K=25
B-1\->\B
If K=34
B+1\->\B
If A<1:1\->\A
If A>16:16\->\A
If B<1:1\->\B
If B>8:8\->\B
E+1\->\E
9-(int (E/3))\->\F
If F\<=\0
0\->\F
Output(B,A,F
For(\@\,1,40:End
[A](B+1,A+1)\->\\@\
If \@\=1
Output(B,A,"O"
If \@\=0
Output(B,A," "
If K=105 or F\<=\0
Then
If [A](B+1,A+1)=1
1\->\\@\
2\->\[A](B+1,A+1)
1\->\G
Output(B,A,"*"
End
End

0\->\G
While G=0
1\->\G
For(Y,2,9
For(X,2,17
If [A](Y,X)=2
Then
For(A,\(-)\1,1
For(B,\(-)\1,1
If [A](Y+B,X+A)=1
Then
Output(Y+B-1,X+A-1,"*"
2\->\[A](Y+B,X+A
\@\+1\->\\@\
0\->\G
End
End
End
3\->\[A](Y,X)
End
End
End
End

ClrHome
int ((\@\/D)*100)\->\\@\
Output(4,8,\@\
Output(5,5,"PERCENT"
{1,1}\->\DIM [A]
Stop
MIKE TILSTRA
ARLIN SANDBULTE
\STOP82\
