return;\r
}\r
\r
-void setup(void) {\r
+void setup(int needprompt) {\r
int i,j, krem, klumper;\r
int ix, iy;\r
alldone = gamewon = 0;\r
idebug = 0;\r
#endif\r
// Decide how many of everything\r
- if (choose()) return; // frozen game\r
+ if (choose(needprompt)) return; // frozen game\r
// Prepare the Enterprise\r
ship = IHE;\r
energy = inenrg = 5000.0;\r
prout("An unknown number of Romulans.");\r
if (game.state.nscrem) prout("and one (GULP) Super-Commander.");\r
prout("%d stardates.",(int)intime);\r
- proutn("%d starbases in ", inbase);\r
+ proutn("%d starbases in ", inbase);\r
}\r
for (i = 1; i <= inbase; i++) {\r
- cramlc(0, game.state.baseqx[i], game.state.baseqy[i]);\r
- if (i < inbase) proutn(" ");\r
+ proutn(cramlc(0, game.state.baseqx[i], game.state.baseqy[i]));\r
+ proutn(" ");\r
}\r
skip(2);\r
- proutn("The Enterprise is currently in");\r
- cramlc(1, quadx, quady);\r
+ proutn("The Enterprise is currently in ");\r
+ proutn(cramlc(quadrant, quadx, quady));\r
proutn(" ");\r
- cramlc(2, sectx, secty);\r
+ proutn(cramlc(sector, sectx, secty));\r
skip(2);\r
prout("Good Luck!");\r
- if (game.state.nscrem) proutn(" YOU'LL NEED IT.");\r
- skip(1);\r
+ if (game.state.nscrem) prout(" YOU'LL NEED IT.");\r
newqad(0);\r
if (nenhere) shldup=1.0;\r
if (neutz) attack(0); // bad luck to start in a Romulan Neutral Zone\r
}\r
\r
-int choose(void) {\r
+void randomize(void) {\r
+ srand((int)time(NULL));\r
+}\r
+\r
+int choose(int needprompt) {\r
tourn = 0;\r
thawed = 0;\r
skill = 0;\r
length = 0;\r
while (TRUE) {\r
- if (fromcommandline) /* Can start with command line options */\r
- fromcommandline = 0;\r
- else\r
- proutn("Would you like a regular, tournament, or frozen game?");\r
+ if (needprompt) /* Can start with command line options */\r
+ proutn("Would you like a regular, tournament, or frozen game?");\r
scan();\r
if (strlen(citem)==0) continue; // Try again\r
if (isit("tournament")) {\r