Advertisement
Guest User

MAIN.C

a guest
Nov 15th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.12 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <malloc.h>
  4. #include "Random.h"
  5. #include "DandDCharacter.h"
  6.  
  7. int main(void)
  8. {
  9.     struct _Character Character[256];
  10.     //enum _Ancestry Ancestry[0];
  11.  
  12.     int choice=0;
  13.     printf("Main Menu\n- - - - - - - - -\n");
  14.     printf("\n1) Generate a New Character\n");
  15.     printf("2) Save Current Character\n");
  16.     printf("3) Load a Previously Saved Character\n");
  17.     printf("4) Display Current Character\n");
  18.     printf("5) Exit\n");
  19.     printf("\nEnter a selection: ");
  20.     scanf("%d", &choice);
  21.     while (choice > 5 || choice < 1)
  22.     {
  23.         printf("***Error: Selection must be 1-5**\n");
  24.        // main();
  25.        printf("\nEnter a selection: ");
  26.        scanf("%d", &choice);
  27.     }
  28.     switch(choice)
  29.     {
  30.         case 1:
  31.                 break;
  32.  
  33.         case 2:
  34.                 break;
  35.         case 3:
  36.                 break;
  37.         case 4: DisplayCharacter(Character);
  38.                 break;
  39.         case 5: printf("Thanks for playing!!\n");
  40.                 return 0;
  41.  
  42.     }
  43.     //SetSeed(-1);
  44.     //printf("D6 = %d\n",RollD6());
  45.     return 0;
  46.    
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement