"2k Sweeper of Mines", by chill
chill@gol.com

A less-than-2-kilobyte entry for the 2001 Minigame competition
http://demo.raww.net/minigame/
mailto:minigame@demo.raww.net


The Idea
========
This is just great.  No, I'm not bragging about my entry (I'll do that later),
I'm talking about the idea of this competition.
- Several of the most popular 8-bits of their day - you get to pick the one
  you're most nostalgiac about.
- BASIC or assembly, or both! - whichever you're comfortable with or want to
  tackle.
- Write it small - a "put up or shutup"-challenge like a red flag to a bull
  for all of us who rant night and day about code bloat.
- "No prizes, it's just for fun..." - not that I'd mind winning something cool,
  but if somebody had to put up prizes, a community event like this would never
  happen.  And my 8-bit experiences *are* for fun!


The Game
========
Anyone who has had a few minutes to kill on a Windows machine has probably
played Minesweeper, and there are versions of this game for many OSen.  Now
we have one for the CBM line of 8-bits, too.

I won't bore people by explaining the rules in great detail... if you were
able to download and unzip this, I'm sure you've played Minesweeper somewhere
before.  Use the CRSR keys to move, press SPACE to reveal the square under the
cursor (neighbouring squares will automatically be revealed if safe), use
ENTER to toggle the marking of an unrevealed square.  While marking a sqaure
prevents you from accidentally revealing it and gives you a visual assist in
tracking where you think mines might be, the goal of the game is not to mark
all the mines but to reveal all squares EXCEPT the ones which contain the
nasty mines.

No "Beginner" or "Advanced" configurations.  You choose the playfield
dimensions and number of mines to place within it.  Because of the slowness
of my program, it doesn't keep track of how long you take to complete a game.
You either win or lose.


The Program
===========
I wrote this entirely in BASIC because, when I first checked out the
competition website last week, there were no BASIC entries.  For the average
8-bit user, BASIC was more accessible than machine language in many ways.
I know I always learned something as I eagerly devoured the program listings
in each months issue of COMPUTE!'s Gazette.  This may sound vain, but I hope
somebody learns something from my contribution.  I wish the 2k limit allowed
me a few REMs to comment my code more, although as you can see from this
text file I'd probably just ramble on and on and on and on.  Comment bloat?

While my entry is for the C64, I have written it so that it should run on
a range of CBM 8-bit machines... those which I can test it on using VICE,
anyway.  C64, C128, VIC20, CBM2 & PET appear to work and the game tries its
best to determine the available screen width.  No POKEs, PEEKs, SYSs, USRs,
or color codes are used anywhere in the program.  The advantage is tremendous
portability.  The disadvantages are slow gameplay and bland, boring monochrome
on all platforms.  The austerity doesn't concern me, but I found myself
toggling Warp mode in x64 more than a few times.

2k of code and 3k of docs.  Time to stop.
August 26, 2001

