Guest User

Untitled

a guest
Dec 13th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.50 KB | None | 0 0
  1. //Danielle Stramel
  2. //COP 3502C-0001
  3. //monopoly.c
  4. //Due 11/02/12
  5.  
  6.  
  7. /****************************************************************************/
  8. /*  I N C L U D E    F I L E S                                              */
  9. /****************************************************************************/
  10. #include <stdio.h>
  11. #include <ctype.h>
  12. #include <time.h>
  13. #include <string.h>
  14. #include <stdlib.h>
  15.  
  16. /*FUNCTION PROTOTYPES*/
  17. struct property *Buy(int player, struct property *list);
  18. /*********************/
  19.  
  20.  
  21. /*GLOBAL STRUCTS******/
  22.  struct property{
  23.         char name[30];
  24.         int user;
  25.         int num_houses;
  26.         int num_hotels;
  27.         struct property* next;
  28. };
  29. /********************/
  30.  
  31.  
  32. int main(){
  33.  
  34.     int num_players, player=1, choice;
  35.  
  36.     struct property *list;
  37.  
  38.     printf("Welcome to the Monopoly Property Tracker!\n\n");
  39.     printf("How many people are playing?\n");
  40.     scanf("%d", &num_players);
  41.  
  42.     printf("Player %d, what would you like to do?\n", player);
  43.     printf("%*d - Buy Property\n%*d - Improve Property\n%*d - Sell Property\n", 5, 1, 5, 2, 5, 3);
  44.     printf("%*d - View Properties\n%*d - End Turn\n%*d - End Game\n", 5, 4, 5, 5, 5, 6);
  45.     scanf("%d", &choice);
  46.  
  47.     if(choice == 1){
  48.  
  49.  
  50.         }
  51.  
  52.  
  53.  
  54.  
  55.     }
  56.  
  57.  
  58. /****************************************************************************/
  59. /*                                                                          */
  60. /* FUNCTION:    Buy                                                         */
  61. /* USAGE:       enter something here                                        */
  62. /* INPUT:       int player, struct property* list                           */
  63. /* OUTPUT:      property pointer                                            */
  64. /*                                                                          */
  65. /*========================== CHANGELOG ================================*/
  66. /* Author        | DD/MM/YY |        Description                            */
  67. /*--------------------------------------------------------------------------*/
  68. /****************************************************************************/
  69.     struct property *Buy(int player, struct property *list){
  70.  
  71.         struct property *temp;
  72.         temp = (struct property*)malloc(sizeof(struct property));
  73.         list = temp;
  74.  
  75.         printf("What is the name of the property you would like to buy?\n");
  76.         //scanf("%s\n", );
  77.         //printf("%s\n", a.name);
  78.  
  79.         //&temp->user = player;
  80.  
  81.         //while();
  82.  
  83.     }
Add Comment
Please, Sign In to add comment