From 2c72290cf08d4bb03b3ff26df3a1024c355fbea7 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 7 Feb 2005 19:05:07 +0000 Subject: [PATCH] Compute the maximum number of bases from BASEMAX. --- setup.c | 2 +- sst.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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 -- 2.31.1