DROPZ

   This game is semi-simular to Tetris and Columns, but not really.  The
   Game shows a play feild that is 7 spaces wide, and 8 tall.  A piece will
   appear at the top, pieces are the numbers 1-9, it will remain there for
   a while, then drop down.  You can use the right and left arrows keys to
   move the piece to the right or left.  The down arrow key will drop it.
   The object is to get three pieces in a line.  The game will continue til
   the pices stack up to the top.  The next piece and your score is
   displayed on the right.  Right now it is a bit to easy, I think, so I
   may add or change things in later versions.

   This was mostly written as a proof-of-concept, and never really got
   beyond that.

   ===
    Copyright 1995, Micheal Conrad Tilstra, Tadpol.
    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=Dropz 1.0 By Mike Tilstra
\NAME=DROPZ
\FILE=Dropz.82p
ClrHome
{13,12}\->\dim [A]
Fill(0,[A]
0\->\S
For(X,1,8
Output(X,8,"!"
End
Output(1,10,"DROPZ"
Output(4,10,"SCORE"
Output(7,10,"NEXT"
int 9rand+1\->\C
Lbl 1
C\->\D
int 9rand+1\->\C
Output(8,11,C
Output(5,11,S

0\->\G:20\->\T
While G=0
getKey\->\K
If K=24
X-1\->\X
If K=26
X+1\->\X
If K=21
Pause 
If X>7
7\->\X
If X<1
1\->\X
T-1\->\T
If T\<=\0
1\->\G
For(\@\,2,10
If [A](3,\@\)\<>\0
Then
Output(2,10,"DEAD"
{1,1}\->\dim [A]
Stop
End:End
If K=34
1\->\G

Output(1,X,D
For(\@\,1,70:End
Output(1,X," "
End

0\->\G:1\->\Y
While G=0
If [A](Y+3,X+2)\<>\0 or Y\>=\8
Then:1\->\G:Else
Y+1\->\Y:End
Output(Y,X,D
For(\@\,1,40:End
Output(Y,X," "
End
Output(Y,X,D
D\->\[A](Y+2,+2

0\->\F
Y+2\->\Y
X+2\->\X
[A](Y,X)\->\\@\
For(A,\(-)\1,1
If [A](Y+1,X+A)=\@\ and [A](Y+2,X+2A)=\@\:Then
1\->\F
0\->\[A](Y+1,X+A
0\->\[A](Y+2,X+2A
0\->\[A](Y,X
Output(Y-2,X-2," "
Output(Y-1,X+A-2," "
Output(Y,X+2A-2," "
End
If [A](Y-1,X+A)=\@\ and [A](Y-2,X+2A)=\@\:Then:1\->\F
0\->\[A](Y-1,X+A
0\->\[A](Y-2,X+2A
0\->\[A](Y,X
Output(Y-3,X+A-2," "
Output(Y-4,X+2A-2," "
Output(Y-2,X-2," "
End
If [A](Y+1,X+A)=\@\ and [A](Y-1,X-A)=\@\:Then:1\->\F
0\->\[A](Y+1,X+A
0\->\[A](Y-1,X-A
0\->\[A](Y,X
Output(Y-1,X+A-2," "
Output(Y-3,X-A-2," "
Output(Y-2,X-2," "
End
End

If F=0:Then
If [A](Y,X+1)=\@\ and [A](Y,X+2)=\@\:Then:2\->\F
0\->\[A](Y,X+1
0\->\[A](Y,X+2
0\->\[A](Y,X
Output(Y-2,X-1," "
Output(Y-2,X," "
Output(Y-2,X-2," "
End
If [A](Y,X-1)=\@\ and [A](Y,X-2)=\@\:Then:2\->\F
0\->\[A](Y,X-1
0\->\[A](Y,X-2
0\->\[A](Y,X
Output(Y-2,X-2," "
Output(Y-2,X-3," "
Output(Y-2,X-4," "
End
If [A](Y,X-1)=\@\ and [A](Y,X+1)=\@\:Then:2\->\F
0\->\[A](Y,X+1
0\->\[A](Y,X-1
0\->\[A](Y,X
Output(Y-2,X-2," "
Output(Y-2,X-1," "
Output(Y-2,X-3," "
End
End

If F\<>\0:Then
Output(8,8,"*"
For(A,10,4,\(-)\1
For(B,3,9
If [A](A,B)=0
Then
[A](A-1,B)\->\[A](A,B)
0\->\[A](A-1,B)
If [A](A,B)>0
Output(A-2,B-2,[A](A,B))
Output(A-3,B-2," "
End
End
End
Output(8,8,"!"
End

S+F\->\S
Goto 1
Stop
MIKE TILSTRA
\STOP82\
