Date: 2019-12-18 05:49:36


Download


Minefield is an open source (C source, BASIC source) text based game written in C that compiles for the Color Computer, Linux, macOS, and Windows. Minefield was adapted from a program I found in Tim Hartnell's Second Giant Book of Computer Games. A very simple program that is fun to play, and even more fun to program.

To control the console/text screen and read from the keyboard, I use pdcurses on Windows, curses on macOS and Linux, and cmoc for the Color Computer has some basic keyboard and text control built in.

Controls shown below. You can hit ESCAPE any time to exit:

ESCAPE TO QUIT

MOVEMENT:

                UP

                W
       LEFT   A + D   RIGHT
                S

             DOWN

When you start playing you are presented with a minefield and a number that represents your position on the minefield. You have to make your way to the right side, marked with the # without stepping on any mines. As you get close to mines, your number will change from a 0 to a number that indicates the number of mines that are close by. In the example below, you are close to 2 mines. Much like the Minesweeper games.

      M I N E   F I E L D
LEVEL 01  MOVES 025  SCORE 00000

       >....   ........#
       >.... ..........#
       >.... ..........#
       >.... ..........#
       >       2.......#
       >...............#
       >...............#
       >...............#
       >...............#
       >...............#

If you are unlucky and hit a mine, your grave is indicated by the X and the mines @ are revealed.

      M I N E   F I E L D
LEVEL 01  MOVES 026  SCORE 00000

       >....   @.......#
       >.... ..........#
       >.... ..........#
       >.... ...@......#
       >        .......#
       >@.@....X.......#
       >...............#
       >@@.............#
       >...............#
       >...............#

YOU HIT A MINE
PRESS <SPACE> TO TRY AGAIN



Copyright © 2020, Lee Patterson