Advertisement
Guest User

Untitled

a guest
Sep 10th, 2017
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. class Player
  5. {
  6. private:
  7.     int iGold, iWood, iStone;
  8.  
  9. public:
  10.     Player(int g = 100, int w = 5000, int s = 5000)
  11.     {
  12.  
  13.         iGold = g;
  14.         iWood = w;
  15.         iStone = s;
  16.  
  17.     }
  18.  
  19.     void showMenu();
  20.     char chooseOption();
  21.     void showResult();
  22.     void createBuilding();
  23.     void deestroyBuilding();
  24.  
  25. };
  26.  
  27. class Building
  28. {
  29. private:
  30.     int lvl;
  31.  
  32. public:
  33.     Building(int l) lvl = l;
  34.     ~Building lvl = 0;
  35.     virtual void product() = 0;
  36.  
  37. };
  38.  
  39. class GoldMine :public Building
  40. {
  41.  
  42.     void product();
  43.  
  44. };
  45.  
  46. class ChopperHut :public Building
  47. {
  48.  
  49.     void product();
  50.  
  51. };
  52.  
  53. class StoneMine :public Building
  54. {
  55.  
  56.     void product();
  57.  
  58. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement