From: Eric S. Raymond Date: Mon, 7 Feb 2005 19:05:07 +0000 (+0000) Subject: Compute the maximum number of bases from BASEMAX. X-Git-Tag: 2.0~334 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=2c72290cf08d4bb03b3ff26df3a1024c355fbea7;p=super-star-trek.git Compute the maximum number of bases from BASEMAX. --- diff --git a/setup.c b/setup.c index 17c14cf..f50f7c4 100644 --- a/setup.c +++ b/setup.c @@ -469,7 +469,7 @@ int choose(int needprompt) // Use parameters to generate initial values of things damfac = 0.5 * skill; - game.state.rembase = 3.0*Rand()+2.0; + game.state.rembase = 2.0 + Rand()*(MAXBASES-2.0); inbase = game.state.rembase; if (game.options & OPTION_PLANETS) inplan = (PLNETMAX/2) + (PLNETMAX/2+1)*Rand(); diff --git a/sst.h b/sst.h index c9154ad..74f8d6a 100644 --- a/sst.h +++ b/sst.h @@ -18,7 +18,7 @@ #define PLNETMAX (10) #define GALSIZE (8) #define QUADSIZE (10) -#define BASEMAX (6) +#define BASEMAX (5) /* * These macros hide the difference between 0-origin and 1-origin addressing. @@ -52,8 +52,8 @@ typedef struct { killk, // Klingons killed killc, // commanders killed cx[QUADSIZE+1],cy[QUADSIZE+1], // Commander quadrant coordinates - baseqx[BASEMAX], // Base quadrant X - baseqy[BASEMAX], // Base quadrant Y + baseqx[BASEMAX+1], // Base quadrant X + baseqy[BASEMAX+1], // Base quadrant Y isx, isy, // Coordinate of Super Commander nscrem, // remaining super commanders nromkl, // Romulans killed