Here is an alpha-version patch for the "mines" games, based on some changes I saw in a similar version. I liked these when I played the other version, but now speculate the game might be more fun without them. Right now I'm thinking that these should really be done as a run-time option. The difference in playing is that the game will locate all of the squares with zero bombs next to them that you could have found from your current square (with no risk involved.) It's easier to see it happen than to explain. I also did this as a quick-and dirty change, so it is not as "efficient" as it might be, nor as elegant. But it does let you check out if you like the changes. I think that there may be a couple of bugs still in this version, and I am not sure why my changes would have introduced them. The rightmost couple of bottom lables became screwed up when I tried it out, and the game mis-counts the number of enlisted personel killed. Weird. I may look at this again if I find time. (I'm supposed to be studying right now.) Anyhow, for anybody interested in trying them out, here are the patches. Note that any "official" patches won't include this set, so keep an unaltered copy around. (and I'm not the right person to coordinate patches for this game anyway, I haven't tried to contact the author and the orignal-porter-the-3b1 yet) If you DON'T have the original source for these games, that is available on osu-cis. Don't write me for that. Original copyright holder: * Copyright (c) 1987 Tom Anderson; 20831 Frank Waters Road; * Stanwood, WA 98282. All rights reserved. * Modified and distributed with permission of author by * Timothy J. Lipetz; Worthington, OH July 1988 * Kris A. Kugel ( 908 ) 842-2707 uunet!westmark!hico2!kak {daver,ditka,zorch}!hico2!kak internet: k...@hico2.westmark.com P.S. Does anybody out there have an e-mail address for Timothy Lipetz? diff -rc2 mines/board.c mines2/board.c *** mines/board.c Tue Oct 3 21:31:40 1989 --- mines2/board.c Fri Oct 4 17:31:07 1991 *************** *** 23,26 **** --- 23,27 ---- BOOL BlewUpSelf; + void FindSafe(sx,sy); /* * set up the playing surface at the beginning of the game *************** *** 418,423 **** --- 419,427 ---- { PlayerLocation = * dest; + sqp->traversed = FALSE; /* kludge for correct start to FindSafe */ + FindSafe(dest->x,dest->y); sqp->traversed = sqp->occupied = TRUE; DrawSquare(dest); + Message(MineWarningMessage()); } *************** *** 490,491 **** --- 494,561 ---- } + /* + * count how many bombs next to this square. + * note that the algorithm this is used for is pretty inefficent + */ + /* Square MainBoard[XSIDE_SIZE][YSIDE_SIZE]; */ + int + MineCount(sx,sy) + int sx, sy; + { + register int x, y; + int minesFound = 0; + + if (sx < 0 || sx >= XSIDE_SIZE || sy < 0 || sy >= YSIDE_SIZE ) + return -1; + for (x = sx - 1; x <= sx + 1 ; x++) { + for (y = sy - 1; y <= sy + 1 ; y++) { + if (x >= 0 && x < XSIDE_SIZE && y >= 0 && y < YSIDE_SIZE + && MainBoard[x][y].mined) + if( ! MainBoard[x][y].blown ) + minesFound++; + } + } + return minesFound; + } + /* + * count how many bombs next to this square. + * note that the algorithm this is used for is pretty inefficent + */ + /* Square MainBoard[XSIDE_SIZE][YSIDE_SIZE]; */ + void + FindSafe(sx,sy) + int sx, sy; + { + register int x, y; + Coordinate dest; + register Square * sqp; + + sqp = &MainBoard[sx][sy]; + + if (sqp->traversed == TRUE ) + return; + if (MineCount(sx,sy) != 0 ) { + sqp->safe = TRUE; + sqp->unsafe = FALSE; + { /* debug garbage */ + char message[70]; + if (sqp->mined == TRUE && sqp->blown != FALSE) { + sprintf(message,"Bad square at %d %d", sx, sy); + Message(message); + sleep(2); + } + } + } + else { + + sqp->traversed = TRUE; + + for (x = sx - 1; x <= sx + 1 ; x++) + for (y = sy - 1; y <= sy + 1 ; y++) + FindSafe(x,y); + } + dest.x = sx; + dest.y = sy; + DrawSquare(&dest); + return; + }