A downloadable game


Minefield is a one player game for the Commodore 64. 

There will be a slight delay while the mines are randomly placed on the minefield. 

Once this is done, the minefield grid will be drawn. 

Each unexplored space is represented by a circle. The cursor position will blink. Use the cursor keys to move the cursor around the minefield. Press the space bar to examine a spot. If the spot contains a mine, the game will be over. If there is no mine, the circle will be replaced with a number indicating how many adjacent spots have a mine in it. A number in the upper left will indicate how many spaces remain that do not contain a mine. 

When the count decrements to zero, you will have examined all the open spaces without hitting a mine and you win. If you think a spot has a mine, you can flag that spot without examining it by typing the F key. A plus sign will replace the circle when a flag is present.


K is the size of the minefield, L is the playable portion. M array holds mine info, N array holds the number of adjacent mines to each spot. C is the number of non-mine locations. G is upper left of grid on the screen

2 W=(X<>1)*(X<>K)*(Y<>1)*(Y<>K)*INT(RND(0)*1.1):N(X,Y)=0:C=C-W:M(X,Y)=W:NEXT

W randomly places a mine inside the playable area. And decrements C, N array is reset to all zeros. To increase the difficulty, change the 1.1 in the random function to a slightly higher value.


Count up the number of mines adjacent to each spot


place the grid on the screen, print the remaining open spaces, print instructions

5 S=40*Y+X+G:Z$="OQ|] FX+":X=2:Y=2

S is location on screen given x y coordinates. Z$ is a string of allowable inputs

6 I=0:GETA$:FORT=1TO8:I=I-T*(A$=MID$(Z$,T,1)):NEXT:F=PEEK(S):F=(F=209)OR(F=171)

Get the index number for the user input. f is flag for counting remaining open spaces. 209 is the symbol for unexamined spot, 171 is symbol for flag “+” (also unexamined), any other symbol is for a previously examined spot. 

7 POKES,127ANDPEEK(S):J=M(X,Y):X=X-(I=3)*(X>2)+(I=4)*(X<=l):if(I>5)THENPOKES,43

127and will Un-Reverse video of the symbol at the old cursor location, j is set to 1 if a mine is preset at current cursor location. update X value of cursor. Poke 43 puts a flag on the current space but does not examine it.

8 Y=Y-(I=1)*(Y>2)+(I=2)*(Y<=l):S=X+40*Y+G:POKES,128ORPEEK(S):IFC<1THENPRINT"WIN!!!"

Move the Y value of the cursor and reverse video character at that location


If space bar (open) and there is no mine (j=0) then display on the screen the number of adjacent mines. Update count of open spaces remaining

10 PRINT"| ";:IF(I<>5)OR(M(X,Y)=0)THENGOTO6

If a mine is at present cursor and player opens it, end program otherwise goto6 for new input


MINE.txt 3 kB
Prosser 2023 10 line.docx 537 kB
Prosser2023.d64 170 kB

Install instructions

This program will run on the VICE Emulator for the C64. To play:


When Loaded, type RUN and return

Leave a comment

Log in with itch.io to leave a comment.