Advertisement
VistrilMPP

How to Campbellmcmuffin in C++

Jun 21st, 2018
19,340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.72 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. namespace Campbell {
  5.   class Campbell {
  6.     //Access specifier
  7.     public:
  8.     //Data types
  9.     bool isMuted;
  10.     bool isConvoNice = true;
  11.     bool canUnderStand = true;
  12.     bool isSurprised = false;
  13.     int XP = 0;
  14.  
  15.     //Constructor
  16.     Campbell(bool isMutedStatus) {
  17.       isMuted = isMutedStatus;
  18.     }
  19.  
  20.     //Functions
  21.     bool getNice() {
  22.       return isConvoNice;
  23.     }
  24.     bool DoesCampbellUnderstand() {
  25.       return canUnderStand;
  26.     }
  27.     bool IsMuted() {
  28.       return isMuted;
  29.     }
  30.     bool IsSurprised() {
  31.       return isSurprised;
  32.     }
  33.     void setUnderStanding(bool canUnderstand) {
  34.       canUnderStand = canUnderstand;
  35.     }
  36.     void setNice(bool isNice) {
  37.       isConvoNice = isNice;
  38.     }
  39.     void setMuted(bool IsMuted) {
  40.       isMuted = IsMuted;
  41.     }
  42.     void setSurprise(bool IsSurprised) {
  43.       isSurprised = IsSurprised;
  44.     }
  45.     void Nice() {
  46.       cout << "Nice";
  47.       XP++;
  48.     }
  49.     void WellThen() {
  50.       cout <<"Well then";
  51.       XP++;
  52.     }
  53.     void Thinking() {
  54.       cout <<"🤔";
  55.       XP++;
  56.     }
  57.     void WaitWhat() {
  58.       cout <<"Wait what";
  59.       XP++;
  60.     }
  61.     void GetXP() {
  62.       printf("Campbell is a dirty farmer and has %d XP", XP);
  63.     }
  64.   };
  65. }
  66.  
  67. int main() {
  68.   Campbell::Campbell mcmuffin = new Campbell::Campbell(false);
  69.   //Sheevs Discord
  70.   cout << "Is it past Campbell's bed time?";
  71.   string isit;
  72.   cin >> isit;
  73.   bool jokeMuted;
  74.   if (isit == "yes") {
  75.     jokeMuted = true;
  76.   } else {
  77.     jokeMuted = false;
  78.   }
  79.   while (mcmuffin.IsMuted() == false) {
  80.     cout << "Can Campbell understand the conversation?";
  81.     string idkcanyou;
  82.     cin >> idkcanyou;
  83.     if (idkcanyou == "yes") {
  84.       mcmuffin.setUnderStanding(true);
  85.     } else {
  86.       mcmuffin.setUnderStanding(false);
  87.     }
  88.     cout << "Did the conversation take Campbell by surprise?";
  89.     string didit;
  90.     cin >> didit;
  91.     if (didit == "yes") {
  92.       mcmuffin.setSurprise(true);
  93.     } else {
  94.       mcmuffin.setSurprise(false);
  95.     }
  96.     if (mcmuffin.DoesCampbellUnderstand()) {
  97.       if (mcmuffin.IsSurprised()) {
  98.         mcmuffin.WaitWhat();
  99.       }
  100.       cout << "Is the conversation about something good?";
  101.       string isit;
  102.       cin >> isit;
  103.       if (isit == "yes") {
  104.         mcmuffin.setNice(true);
  105.       } else {
  106.         mcmuffin.setNice(false);
  107.       }
  108.       if (mcmuffin.getNice()) {
  109.         mcmuffin.Nice();
  110.       } else {
  111.         mcmuffin.WellThen();
  112.       }
  113.     } else {
  114.       mcmuffin.Thinking();
  115.     }
  116.     cout << "Is it time for Campbell's bedtime now?";
  117.     string isit;
  118.     cin >> isit;
  119.     if (isit == "yes") {
  120.       mcmuffin.setMuted(true);
  121.     }
  122.    
  123.   } //while loop end
  124. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement