[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tetris in Basic



On Mar 8, 10:54 pm, Nama <forums6...@mac.com> wrote:
> I'm looking for a listing of Tetris in Basic. It doesn't have to be
> Apple basic, but a classic 80's basic (not anything modern like visual
> basic) would be great.
>
> Thanks in advance
>
> Philip

It would probably be easier to code it yourself rather than port
someone else's source

generate a random piece
display it
allow it to rotate
make it fall
check for collision with walls/ floor
   check for solid line
     remove it if found


XX
XX

XXXX

X
XXX

  X
XXX

XX
 XX

 XX
XX

 X
XXX

there are only 7 possible shapes, (check wikipedia it has a TON of
information)


the most difficult problem will be display and collision detection.
the rest of the code should be very similar between different systems.