Expand|Select|Wrap|Line Numbers
- void begin_menu(void)
- {
- int choice;
- do
- {
- printf("English Draughts - Main Menu\n\n");
- printf("1. Play Game\n");
- printf("2. Display Winners\n");
- printf("3. Reset Scoreboard\n");
- printf("4. Quit\n");
- scanf("%d",&choice);
- switch (choice)
- {
- case '1' : play();
- break;
- case '2' : /*write function to do here */
- break;
- case '3' : /*write function to do here */
- break;
- case '4' : printf("Goodbye!\n");
- exit(0);
- break;
- default: printf("Please insert a correct choice.\n");
- break;
- }
- } while (choice != 4);
- }
- void play(void)
- {
- while(end != "n");
- {
- printf("Player Names\n\n");
- printf("Enter name for first player:\n");
- scanf("%s",&player_one);
- printf("Enter name for second player:\n");
- scanf("%s",&player_two);
- printf("Begin?(y to start, n to quit)\n");
- scanf("%c",&end);
- }
- return;
- }