home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / vmsnet / vmsspace / part06 < prev    next >
Encoding:
Internet Message Format  |  1993-06-06  |  18.8 KB

  1. Path: uunet!mcsun!chsun!pega!dr_who
  2. From: dr_who@pegasus.ch (Sysop of PEGASUS)
  3. Newsgroups: vmsnet.sources.games
  4. Subject: SPCEMP.C   Part 06/06
  5. Message-ID: <1993Jun7.093419.127@pegasus.ch>
  6. Date: 7 Jun 93 09:34:19 +0200
  7. Organization: Pegasus BBS, Switzerland
  8. Lines: 628
  9. Xref: uunet vmsnet.sources.games:739
  10.  
  11. ----> START OF PART 6 <----
  12. /*****************************************************************/
  13. /* GAME MANAGER                                                  */
  14. /*****************************************************************/
  15. game_mgr()
  16. {
  17. char ostring[80];
  18. long n=0;
  19.  
  20. mgr_menu();
  21.  
  22. do 
  23. {
  24.  printf("Which would you like to do ? [?] MgrMenu  ");
  25.  gets(ostring);
  26.  if(strlen(ostring)<1)
  27.     strcpy(ostring,"0");    
  28.  sscanf(ostring,"%d",&n);
  29.  if(ostring[0]=='?') 
  30.     {
  31.     mgr_menu();
  32.     n=255;
  33.     }
  34.  if((n>0)&&(n<45)) 
  35.    {
  36.    if(n==1)
  37.     {
  38.     printf("Enter Username : ");
  39.     gets(player[epn].player);
  40.     get_datas(epn);
  41.     mgr_menu();
  42.     }
  43.    if(n==2)
  44.     player[epn].moves=mgr_change("Free Moves",player[epn].moves);
  45.    if(n==3)
  46.     player[epn].population=mgr_change("Population",player[epn].population);
  47.    if(n==4)
  48.     player[epn].harmony=mgr_change("Harmony",player[epn].harmony);
  49.    if(n==5)
  50.     player[epn].morale=mgr_change("Army Morale",player[epn].morale);
  51.    if(n==6)
  52.     player[epn].tech_level=mgr_change("Technology Level",player[epn].tech_level);
  53.    if(n==7)
  54.     player[epn].health=mgr_change("Health Level",player[epn].health);
  55.    if(n==8)
  56.     player[epn].credits=mgr_change("Credits",player[epn].credits);
  57.    if(n==9)
  58.     player[epn].acredits=mgr_change("Bank Credits",player[epn].acredits);
  59.    if(n==10)
  60.     player[epn].soldiers=mgr_change("Soldiers",player[epn].soldiers);
  61.    if(n==11)
  62.     player[epn].agents=mgr_change("Agents",player[epn].agents);
  63.    if(n==12)
  64.     player[epn].pilots=mgr_change("Pilots",player[epn].pilots);
  65.    if(n==13)
  66.     player[epn].fighters=mgr_change("X-Wing",player[epn].fighters);
  67.    if(n==14)
  68.     player[epn].ywings=mgr_change("Y-Wing",player[epn].ywings);
  69.    if(n==15)
  70.     player[epn].cruisers=mgr_change("Cruisers",player[epn].cruisers);
  71.    if(n==16)
  72.     player[epn].carriers=mgr_change("Carriers",player[epn].carriers);
  73.    if(n==17)
  74.     player[epn].defense=mgr_change("DefenseStations",player[epn].defense);
  75.    if(n==18)
  76.     player[epn].missiledefense=mgr_change("MissileDefense",player[epn].missiledefense);
  77.    if(n==19)
  78.     player[epn].freighters=mgr_change("Freighters",player[epn].freighters);
  79.    if(n==20)
  80.     player[epn].orep=mgr_change("Ore-Planets",player[epn].orep);
  81.    if(n==21)
  82.     player[epn].foodp=mgr_change("Food-Planets",player[epn].foodp);
  83.    if(n==22)
  84.     player[epn].defensep=mgr_change("Defense-Planets",player[epn].defensep);
  85.    if(n==23)
  86.     player[epn].tourismp=mgr_change("Tourism-Planets",player[epn].tourismp);
  87.    if(n==24)
  88.     player[epn].tradep=mgr_change("Trade-Planets",player[epn].tradep);
  89.    if(n==25)
  90.     player[epn].governp=mgr_change("Governing-Planets",player[epn].governp);
  91.    if(n==30)
  92.     player[epn].race=mgr_change("Race",player[epn].race);
  93.    if(n==31)
  94.     player[epn].played_moves=mgr_change("Played Moves",player[epn].played_moves);
  95.    if(n==32)
  96.     player[epn].protection=mgr_change("Protection",player[epn].protection);
  97.    if(n==40)
  98.     player[epn].starfighters=mgr_change("Imperial Starfighters",player[epn].starfighters);
  99.    if(n==41)
  100.     player[epn].deathstars=mgr_change("Imperial DeathStar",player[epn].deathstars);
  101.    }
  102. put_datas(epn);
  103. } while (n!=0);
  104.  
  105. get_datas(pn);
  106. printf("\n");
  107. }
  108.  
  109. long mgr_change(char string[80],long amount)
  110. {
  111. char ostring[80];
  112. long tmpn;
  113.  
  114.   printf("%s : [%ld] ",string,amount);
  115.   gets(ostring);
  116.   sscanf(ostring,"%ld",&tmpn);
  117.   if(ostring[0]==0) tmpn=amount;
  118.  
  119. return tmpn;
  120. printf("\n");
  121. }
  122.  
  123.  
  124. mgr_menu()
  125. {
  126. cls();
  127. printf("\n\nGAME MANAGER-MENU  (1/30) PLAYERDATAS : [%s]-[%s] \n",player[epn].player,race[player[epn].race].name);
  128. printf("------------------------------------------------------------------------------\n");
  129. printf("Global : (2) Free   Moves: %d   (3) Population : %d Millions \n",player[epn].moves,player[epn].population);
  130. printf("         (31)Played Moves: %d   (32)Protection : %d \n",player[epn].played_moves,player[epn].protection);
  131. printf("Levels : (4) Harmony:%d  (5) Army Morale:%d  (6) Technology:%d  (7) Health:%d\n",player[epn].harmony,player[epn].morale,player[epn].tech_level,player[epn].health);
  132. printf("Money  : (8) Money: %9ld cr. (9) BankAccount: %9ld cr.\n\n",player[epn].credits,player[epn].acredits);
  133.  
  134. printf("Army   : (10) Soldiers: %6ld (11) Agents : %6ld (12) Pilots   : %6ld\n",player[epn].soldiers,player[epn].agents,player[epn].pilots);
  135. printf("         (13) X-Wing  : %6ld (14) Y-Wing : %6ld (15) Cruisers : %6ld\n",player[epn].fighters,player[epn].ywings,player[epn].cruisers);
  136. printf("         (16) Carrier : %6ld (17) Defense: %6ld (18) M.defense: %6ld\n",player[epn].carriers,player[epn].defense,player[epn].missiledefense);
  137. printf("         (19) Freight.: %6ld (40) St.Figh: %6ld (41) Death St.: %6ld\n\n",player[epn].freighters,player[epn].starfighters,player[epn].deathstars);
  138.  
  139. printf("Planets: (20) Mining  : %6ld (21) Food   : %6ld (22) Defense  : %6ld \n",player[epn].orep,player[epn].foodp,player[epn].defensep);
  140. printf("         (23) Tourism : %6ld (24) Trade  : %6ld (25) Governing: %6ld \n",player[epn].tourismp,player[epn].tradep,player[epn].governp);
  141. printf("");
  142. printf("-----------------------------------------------------------[0] for Mainmenu---\n\n");
  143. }
  144.  
  145. /*****************************************************************/
  146. /*Display the HELPmenu                         */
  147. /*****************************************************************/
  148. display_shorthelp()
  149. {
  150. unsigned long money=0;
  151. unsigned long m2=0;
  152. unsigned long amount=0;
  153. unsigned long chances=0;
  154. unsigned long offense=0;
  155. unsigned long defense=0;
  156. char ostring[80];
  157. long totplanets=(player[pn].orep+player[pn].foodp+player[pn].defensep+player[pn].tradep+player[pn].tourismp);
  158.  
  159. cls();
  160.  
  161. money=money+(player[pn].governp*10000);
  162. m2=(you_give("Galactic Advisor",money));
  163.  
  164. if(m2<money) 
  165.     printf("\nYour Galactic Advisor refuses to answer !\n\n");
  166.  
  167. if(m2>=money) 
  168.     {
  169.     printf("\nYour Galactic Advisor speaks:\n\n");
  170.  
  171.     if(player[pn].harmony<0)                /* Check harmony */
  172.         {
  173.         printf("Your people are not very happy, do something against it !\n");
  174.         printf("Try to give them more food or money !\n");
  175.         printf("Don't give only slightly more money or food than asked, \ngive twice as much or even more !\n\n"); 
  176.         press_return();
  177.         }
  178.     if((player[pn].harmony>=0)&&(player[pn].harmony<=5))    /* Check harmony */
  179.         {
  180.         printf("Your people are quite happy, but you should look after them !\n");
  181.         printf("Try to give them more food or money !\n\n");
  182.         press_return();
  183.         }
  184.  
  185.     if(player[pn].health<0)                    /* Check health */
  186.         {
  187.         printf("Your people are not healthy, do something against it !\n");
  188.         printf("Try to do more research !\n");
  189.         printf("Don't give only slightly more money than asked for,\n give twice as much or even more !\n\n"); 
  190.         press_return();
  191.         }
  192.  
  193.     if(player[pn].tech_level<1)                /* check tech level */
  194.         {
  195.         printf("You should do more technology reseearch !!!! \n");
  196.         printf("The higher your level the better weapons you can buy \n\n");
  197.         press_return();
  198.         }
  199.  
  200.     if(totplanets/25>player[pn].governp)            /* check governp */
  201.         {
  202.         printf("You dont have enough Governing planets !! \n");
  203.         printf("Buy %ld of those...\n\n",totplanets/25-player[pn].governp+1);
  204.         press_return();
  205.         }
  206.  
  207.     }
  208. if(m2>money+10000) 
  209.     {
  210.     if(player[pn].harmony>5)                /* Check harmony */
  211.         {
  212.         printf("Your population is very happy !\n");
  213.         printf("Next time you could afford to give them less money than asked !\n");
  214.         printf("Try the half of the requested amount !\n\n"); 
  215.         press_return();
  216.         }
  217.  
  218.      if(player[pn].population/100<player[pn].tourismp)    /* check tourismplanets */
  219.         {
  220.         amount=((player[pn].population/100)-player[pn].tourismp)-1;
  221.         if (amount>=1)
  222.             printf("You should buy %d tourism planets more.\n (It's risky but you earn a lot of money !)\n\n",amount);
  223.         press_return();
  224.         }
  225.     }
  226. }
  227.  
  228. get_prices()
  229. {                                /* RND PRICES 80-120 % */
  230. price_fighters=(180*(24-race[player[pn].race].mechanical)      *(rnd(40)+80))/100; 
  231. price_ywings=(190*(24-race[player[pn].race].mechanical)        *(rnd(40)+80))/100;
  232. price_defense=(200*(24-race[player[pn].race].mechanical)       *(rnd(40)+80))/100;
  233. price_cruisers=(400*(24-race[player[pn].race].mechanical)      *(rnd(40)+80))/100;
  234. price_carriers=(800*(24-race[player[pn].race].mechanical)      *(rnd(40)+80))/100;
  235. price_freighters=(500*(24-race[player[pn].race].mechanical)    *(rnd(40)+80))/100;
  236. price_missiledefense=(500*(24-race[player[pn].race].mechanical)*(rnd(40)+80))/100;
  237. price_deathstars=(1000000*(24-race[player[pn].race].mechanical)*(rnd(40)+80))/100;
  238. price_starfighters=(1000*(24-race[player[pn].race].mechanical) *(rnd(40)+80))/100;
  239.  
  240. /* RND Trade prices */
  241.  
  242. p_food=rnd(1)+2;       /*  2-  3 */
  243. p_textiles=rnd(10)+4;  /*  4- 14 */
  244. p_minerals=rnd(20)+20; /* 20- 40 */
  245. p_aloys=rnd(10)+20;    /* 20- 30 */
  246. p_machines=rnd(20)+80; /* 80-100 */
  247. p_computers=rnd(20)+70;/* 70- 90 */
  248. p_silver=rnd(40)+100;  /*100-140 */
  249. p_gems=rnd(100)+200;   /*200-300 */
  250.  
  251. }
  252.  
  253.  
  254. long get_offense(int nr)
  255. {
  256. double chance=0;
  257. unsigned long offense=0;
  258.  
  259. offense  = player[nr].ywings*3 + player[nr].cruisers*4 + player[nr].fighters*2 + player[nr].soldiers + player[nr].defensep*20 + player[nr].starfighters*10;
  260.  
  261. /* Soldiers vs. other weapons adjustment. */
  262.  
  263. if(player[nr].soldiers < (player[nr].cruisers+player[nr].fighters+player[nr].ywings+player[pn].starfighters*100)) 
  264.     offense = offense - ((player[nr].cruisers+player[nr].fighters+player[nr].ywings)-player[nr].soldiers-(player[nr].starfighters*8));
  265.  
  266. chance = (100 + player[nr].morale) * 0.01;
  267. if(chance<0.5) chance = 0.5;
  268. if(chance>2.0) chance = 2.0;
  269.  
  270. if(offense*chance>0)
  271.     offense = offense * chance;
  272.  
  273. offense = (offense * (race[player[nr].race].strength+race[player[nr].race].knowledge))/10;   /*RACE*/
  274.  
  275. /* death-star adjustments - each makes the army 10 % stronger */
  276. offense =  ((10+player[nr].deathstars)*offense)/10;
  277.  
  278. return(offense);
  279. }
  280.  
  281.  
  282. long get_defense(int nr)
  283. {
  284. double chance=0;
  285. unsigned long defense=0;
  286.  
  287. defense = player[nr].ywings*4 + player[nr].cruisers*4 + player[nr].defense *2 + player[nr].soldiers + player[nr].defensep*22 + 50 + player[nr].starfighters*10;
  288.  
  289. if (player[nr].tech_level>10)
  290.     defense=defense+(player[nr].defense*3);
  291. if (player[nr].tech_level>20)
  292.     defense=defense+(player[nr].defense*3);
  293.  
  294. /* Soldiers vs. other weapons adjustment. */
  295.  
  296. if(player[nr].soldiers < (player[nr].cruisers+player[nr].defense+player[nr].ywings+player[nr].starfighters*100)) 
  297.     defense = defense - ((player[nr].cruisers+player[nr].defense+player[nr].ywings)-player[nr].soldiers-(player[nr].starfighters*8));
  298.  
  299. chance = (100 + player[nr].morale) * 0.01;
  300. if(chance<0.5) chance = 0.5;
  301. if(chance>2.0) chance = 2.0;
  302.  
  303. if(defense*chance>0)
  304.     defense = defense * chance;
  305.  
  306. defense = (defense * (race[player[nr].race].strength+race[player[nr].race].knowledge))/10;   /*RACE*/
  307.  
  308. /* death-star adjustments - each makes the army 10 % stronger */
  309. defense =  ((10+player[nr].deathstars)*defense)/10;
  310.  
  311. return(defense);
  312. }
  313.  
  314.  
  315. long get_missiledefense(int nr)
  316. {
  317. unsigned long chances=0;
  318.  
  319. chances=(player[nr].missiledefense+(40*player[nr].defensep))/100;
  320. if(chances>90) chances=90;
  321. return(chances);    
  322. }
  323.  
  324. /*****************************************************************/
  325. /*Display the Mainmenu                         */
  326. /*****************************************************************/
  327. display_mainmenu()
  328. {
  329. time_t zeit;
  330. char   *t[21];
  331.  
  332.   zeit = time (&zeit);
  333.   strncpy(t,ctime(&zeit),19);                /* NOT AN ANSI STANDART */
  334.   t[20]='\0';
  335.  
  336. cls();
  337. printf("\n\nMAIN-MENU   SuperSpaceEmpire V%s\n",version);
  338. printf("----------------------------------------------------\n");
  339. /* printf("1) Alliances [*]\n"); */
  340. printf(" 2) Buy/Sell equipment - Cultivate Planets \n");
  341. if ((player[pn].agents>0)&&(rocket_use==TRUE))
  342.     printf(" 3) Covert activities\n");
  343. if ((player[pn].agents>0)&&(rocket_use==TRUE)&&(player[pn].tech_level>4))
  344.     printf(" 4) Missile Attacks\n");
  345. if ((player[pn].soldiers>0)&&(attacking==TRUE))
  346.     printf(" 5) Battle\n");
  347. if ((player[pn].pilots>0)&&(player[pn].freighters>0)&&(player[pn].tradep>0))
  348.     printf(" 6) Trade \n");
  349. else
  350.     printf(" -) Trade (You don`t have the nessesary things)\n");
  351. printf(" 7) Visit the Bank\n");
  352. printf(" 8) Tax / Lottery\n");
  353. printf(" 9) Misc (Send MSG/Read News/Scores)\n");
  354. printf("10) Ask the Galactic Advisor for help\n\n");
  355. printf(" 0) End of turn\n");
  356. printf("---------------------------[%s]----\n",t);
  357. }
  358.  
  359. /*****************************************************************/
  360. /*****************************************************************/
  361. /*****************************************************************/
  362. main_menu()
  363. {
  364. char ostring[80];
  365. long n=0;
  366. unsigned long pvalue;
  367. unsigned long totplanets;
  368. rocket_use=TRUE;
  369. attacking=TRUE;
  370.  
  371. display_mainmenu();
  372.  
  373. do 
  374. {
  375.  printf("You chose ... [?] MainMenu [0] Quit turn ");
  376.  gets(ostring);
  377.  sscanf(ostring,"%d",&n);
  378.  
  379.  if(strlen(ostring)<1)
  380.     n=99;
  381.  if(ostring[0]=='?') 
  382.     {
  383.     display_mainmenu();
  384.     n=99;
  385.     }
  386.  
  387.  if((n>0)&&(n<11)) 
  388.    {
  389. /*   if(n==1)
  390.     team_round(); */
  391.    if(n==2)
  392.     buying_stage();
  393.    if((n==3)&&(rocket_use==TRUE))
  394.     spying_stage(); 
  395.    if((n==4)&&(rocket_use==TRUE)&&(player[pn].tech_level>4))
  396.     missile_stage();
  397.    if((n==5)&&(attacking==TRUE))
  398.     ask_battle();
  399.    if((n==5)&&(attacking==FALSE))
  400.     printf("Attacking is allowed only once a move ...\n");
  401.    if ((n==6)&&(player[pn].pilots>0)&&(player[pn].freighters>0)&&(player[pn].tradep>0))
  402.        trading_stage();
  403.    if(n==7)
  404.     bank_stage();
  405.    if(n==8)
  406.     option_stage();
  407.    if(n==9)
  408.     misc_stage();
  409.    if(n==10)
  410.     display_shorthelp();
  411.    }
  412. } while (n!=0);
  413.  
  414. printf("\n");
  415. }
  416.  
  417. /*****************************************************************/
  418. /*****************************************************************/
  419. /*****************************************************************/
  420. /*****************************************************************/
  421. int get_race()
  422. {
  423. char choice[20]="none";
  424. int x=1;
  425. int ret=1;
  426.  
  427. cls();
  428. printf("\n\nIt's time to chose a race.\n\n");
  429. printf("Each of the following ones has positiv and negativ points.\n\n");
  430. printf("Shorts: Dx=Dexterity  Kn=Knowledge Me=Mechanical\n");
  431. printf("        Pc=Perception St=Strenght  Te=Technical\n");        
  432. printf("\n\n");        
  433.  
  434. x=1;
  435. do {
  436.     printf(" %2d : %-20s (Dx:%2d/Kn:%2d/Me:%2d/Pc:%2d/St:%2d/Te:%2d)\n",x,race[x].name,race[x].dexterity,race[x].knowledge,race[x].mechanical,race[x].perception,race[x].strength,race[x].technical);
  437.     x++;
  438.    } while(x<racecount);
  439.  
  440. printf("\n");
  441.  
  442. do {
  443.    printf(" You Chose : ");
  444.    gets(choice);
  445.    sscanf(choice,"%d",&ret);
  446.    } while (ret<0||ret>racecount);
  447.  
  448. printf("\n\n");
  449. return(ret);
  450. }
  451.  
  452. /***********************************************************************************/
  453. /***********************************************************************************/
  454. check_played()
  455. {
  456. int x=1;
  457.  
  458. do     {
  459.     if((strcmp(player[x].username,username)==0)&&(player[x].alive==TRUE))   /* FOUND */    
  460.         pn=player[x].nr;
  461.     x++;
  462.     } while (x<27);
  463.  
  464. if(pn>0)                                      /* IF FOUND */
  465.     {
  466.     strcpy(player,player[pn].player);           /* GET PLAYERNAME */
  467.     return(TRUE);                      /* RETURN FOUND */
  468.     }
  469.  
  470. return(FALSE);                         /* RETURN NOT FOUND */
  471.  
  472. }
  473.  
  474. /***********************************************************************************/
  475. /***********************************************************************************/
  476. check_freespace()
  477. {
  478. int x=1;
  479. int ret=FALSE;
  480. FILE *fp;
  481.  
  482. do     {
  483.     if((player[x].alive==FALSE)&&(ret==FALSE))    /* EMPTY ROOM FOUND */    
  484.         {        pn=player[x].nr;
  485.         player[x].alive=TRUE;
  486.         strcpy(player[x].username,username);
  487.         ret=TRUE;                /* RETURN FOUND*/
  488.         }
  489.     x++;
  490.     } while (x<27);
  491.  
  492. fclose(fp);                        /* CLOSE SCORE FILE */
  493.  
  494. if(ret==TRUE)
  495.     update_scores();                /* UPDATE HIGHSCORES */
  496.  
  497. return(ret);                        /* RETURN NOT FOUND */
  498.  
  499. }
  500.  
  501. /***********************************************************************************/
  502. /***********************************************************************************/
  503. update_scores()
  504. {
  505. int x=1;
  506. FILE *fp;
  507.  
  508. sprintf(filename,"%sEMPIRE.SCORES",mainpath);        /* Create STARWARS.SCORES */
  509. /*
  510. fp=fopen(filename,"r");
  511. do {                             READ ALL EXCEPT OWN DATAS 
  512.     if(x!=pn)
  513.         fread(&player[x],sizeof(player[x]),1,fp);
  514.     x++;
  515.    } while (x<27);
  516. fclose(fp);
  517. */
  518.  
  519. x=1;
  520. fp=fopen(filename,"w");
  521. do {                            /* WRITE ALL DATAS AGAIN */
  522.         fwrite(&player[x],sizeof(player[x]),1,fp);
  523.     x++;
  524.    } while (x<27);
  525. fclose(fp);
  526. }
  527.  
  528. /***********************************************************************************/
  529. /***********************************************************************************/
  530. display_scores()
  531. {
  532. int x=1;
  533. FILE *fp;
  534.  
  535. sprintf(filename,"%sEMPIRE.SCORES",mainpath);    
  536. fp=fopen(filename,"r");
  537. do {                            /* READ ALL DATAS */
  538.     fread(&player[x],sizeof(player[x]),1,fp);
  539.     x++;
  540.    } while (x<27);
  541. fclose(fp);
  542.  
  543. cls();
  544. printf(" SPACE EMPIRE (tm) %s  HIGH-SCORES \n",version);
  545. printf("----------------------------------------------------------\n");
  546. x=1;
  547. do {    
  548.     if((player[x].alive==TRUE)||(debug==TRUE))
  549.         printf(" %-40s %8ld %-5d\n",player[x].player,player[x].score,player[x].played_moves);
  550.     x++;
  551.    } while (x<27);
  552. printf("----------------------------------------------------------\n");
  553.  
  554. }
  555.  
  556. /*****************************************************************/
  557. /*****************************************************************/
  558. /*****************************************************************/
  559. /*****************************************************************/
  560.  
  561. /*****************************************************************/
  562. /***********  MAIN ********** MAIN *********** MAIN **************/
  563. /*****************************************************************/
  564.  
  565. main()
  566. {
  567. long move;
  568. int ostring[80];
  569. int chose;
  570. FILE *fp;
  571.  
  572.   srand(clock());
  573.   get_date();
  574.   
  575.   create_files();
  576.   Load_Config();
  577.   check_busy();
  578.   daily_maint();
  579.   check_lord();
  580.   check_new();
  581.   show_info();
  582.  
  583.   if(player[pn].race==0)            /* temporaer only */
  584.     player[pn].race=get_race();
  585.  
  586.   while (player[pn].moves>0)
  587.   {
  588.  
  589.     get_prices();                /* create Random prices */
  590.     earning(pn);                /* Give him the new earned money */
  591.     random_stage(pn);                /* random happenings if any */
  592.     ruling_stage(pn);                /* spend your money (wisely) */
  593.  
  594.     player[pn].played_moves++;                 /* add played moves */
  595.     player[pn].moves--;                /* remove a move */
  596.     if (player[pn].protection>0)        /* remove protection */
  597.         player[pn].protection--;
  598.     put_datas(pn);
  599.  
  600.     usedtransport=0;
  601.  
  602.     main_menu();                /* mainmenu */
  603.     rest();
  604.  
  605.     printf("Do you want to see the Scores ? (y/N) ");
  606.     gets(ostring);
  607.     points(1);
  608.     if (toupper(ostring[0])=='Y')
  609.       display_users();
  610.  
  611.  
  612.     printf("Do you wish to continue? [Y/n] ");
  613.     gets(ostring);
  614.     if((ostring[0]!='n')&&(ostring[0]!='N')) 
  615.       printf("");
  616.      else
  617.       break;
  618.     }
  619.  
  620.   put_datas(pn);
  621.  
  622.   sprintf(ostring,"SPCEMP_PLAYERS:MSG_%s.TXT",player[pn].player);
  623.   delete_file(ostring);
  624.   sprintf(ostring,"SPCEMP_PLAYERS:MSG_%s.TXT",player[pn].player);
  625.   fp=fopen(ostring,"w");
  626.   fclose(fp);
  627.  
  628.   bye();
  629.  
  630. } /* end of main */
  631. ----> END OF PART 6 <----
  632. -- 
  633.       Internet: Dr_who@pegasus.ch         __
  634.       Phone   : ++41-71-71 70 42         ///
  635.       FAX     : ++41-71-71 27 87    __  ///    "I'M THE DOCTORE BECAUSE 
  636.                                     \\\///      IT'S FUN FUN FUN ! "
  637.      BBS Phone: ++41-71-71 55 77     \XX/       - TOM BAKER 
  638.       X.25    : +228 4752 1 2574        
  639.