home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 3
/
CDPDIII.bin
/
bbs
/
ff810.lha
/
FF810
/
Snake
/
snake.doc
< prev
next >
Wrap
Text File
|
1993-01-24
|
2KB
|
42 lines
SNAKE
by Michael Warner
Yes, it's SNAKE!!!. Not exactly the cutting edge of computer gaming, but
those of you with memories stretching back into the 70s may have seen it
before. I first saw it on the TRS-80 which I approached with awe in the
local Tandy store, and was hooked on it. Since then I've written it for a
number of machines as a let's-try-programming-this-thing exercise,
including a Vax at Uni (not a great real-time platform, unfortunately) and
an Apollo Prism(!) In fact, I can proudly state that SNAKE is the only
program I've ever written for the IBM PC (Turbo Pascal), probably a unique
claim among professional programmers!! It was also the first graphical
program I wrote on my shiny new Amiga 1000 back in early '86; that version
has vanished in the mists of time...
Anyway, the game (I assume the default 2.0 colour scheme):
SNAKE is played on a 40*40 matrix which fills a Workbench window. You are
the blue dot in the centre - to increase in length (the object of the game)
you must eat frogs (the white dots) while avoiding bricks (the black dots).
Frogs come and go randomly, but there are always five of them at any
moment. One in ten disappearing frogs is replaced by a brick. If you hit
yourself, a side wall or a brick you die; once your length is greater than
one you cannot reverse your direction.
Movement is with the cursor keys; once a game has started you cannot stop
moving. Press a cursor key to start each game. Other keys are P to pause
(any key to unpause) and ESC to quit.
From the few games I've played, I'd say that if you can get to 400 you're
doing well...
SNAKE requires AmigaDOS 2.0 or higher and a Workbench screen at least 256
pixels high - it adjusts itself to give a decent aspect ratio on Workbench
screens of different vertical resolutions. It should run smoothly
regardless of system load. SNAKE was compiled under SAS 6.1.
Feel free to use this code as you please, but please acknowledge me.