34 lines
967 B
Text
34 lines
967 B
Text
$NetBSD: patch-aa,v 1.1 1999/12/29 16:18:53 bad Exp $
|
|
|
|
--- demineur.c.orig Thu Jul 29 23:25:30 1999
|
|
+++ demineur.c Sun Nov 14 23:28:02 1999
|
|
@@ -71,20 +71,18 @@
|
|
|
|
if ( option_mines != 0 )
|
|
{
|
|
- if ( option_mines >= board.rows * board.columns )
|
|
- {
|
|
- printf ( "Too many mines, using default number.\n" ) ;
|
|
- mines = board.mines = board.rows * board.columns / 4.8 ;
|
|
- }
|
|
- else
|
|
- {
|
|
- mines = board.mines = option_mines ;
|
|
- }
|
|
+ board.mines = option_mines; /* override default */
|
|
}
|
|
- else
|
|
+ if ( board.mines >= board.rows * board.columns )
|
|
{
|
|
- mines = board.mines = board.rows * board.columns / 4.8 ;
|
|
+ printf ( "Too many mines, using default number.\n" ) ;
|
|
+ board.mines = 0;
|
|
}
|
|
+ if ( board.mines == 0 ) /* if not set yet, use default */
|
|
+ {
|
|
+ board.mines = board.rows * board.columns / 4.8 ;
|
|
+ }
|
|
+ mines = board.mines;
|
|
|
|
elapsed = 0 ;
|
|
state = PLAYING ;
|