Advertisement
Guest User

Being a dad - SOFTWARE STYLE

a guest
Jun 17th, 2014
522
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.59 KB | None | 0 0
  1. #include "Child.h"
  2. #include "CharlieBean.h"
  3. #include "BabbyFud.h"
  4. #include "BabbyPoops.h"
  5.  
  6. bool prepareBottle( Bottle b, EFluidType food, float volume_ml );
  7. bool feed( Child kidlet, EFluidType food, float volume_ml );
  8. FecalInformation changeDiaper( Child kidlet );
  9. void cuddles( Child kidlet );
  10.  
  11. void panic();
  12. int quickSleep();
  13.  
  14. // defined statically because she shall persist regardless of
  15. static const float CharlieCutenessPercent = 100.0f;
  16. Child charlieBean( "Charlotte", "Helen", "Anderson", CharlieCutenessPercent );
  17.  
  18. int main()
  19. {
  20.     int energy = 100;
  21.     Bottle[] bottles[MAX_BOTTLES];
  22.     uint currentBottle = 0;
  23.  
  24.     while (1)
  25.     {
  26.         // Feed Cycle
  27.         if ( !feed( charlieBean, E_BREAST_MILK, 40 ) ) panic();
  28.    
  29.         FecalInformation poopDeets = changeDiaper( charlieBean );
  30.     if ( poopDeets.size > E_SHITLOAD ) panic();
  31.        
  32.         if ( !feed( charlieBean, E_FORMULA_NEWBORN, 40 ) ) panic();
  33.        
  34.         cleanBottles();
  35.         sterilizeBottles();
  36.  
  37.         // Cuddle and Stare. These functions monitor the system clock (poorly) and will return... eventually
  38.         cuddles( charlieBean );
  39.         stareAt( charlieBean );
  40.     if ( energy <= 0 )
  41.         {
  42.             energy += quickSleep();
  43.         }
  44.  
  45.         if ( !prepareBottle( bottle[currentBottle++], E_BREAST_MILK, 40 ) ) panic();
  46.         if ( currentBottle >= MAX_BOTTLES) currentBottle = 0;
  47.         if ( !prepareBottle( bottle[currentBottle++], E_FORMULA_NEWBORN, 40 ) ) panic();
  48.         if ( currentBottle >= MAX_BOTTLES) currentBottle = 0;
  49.  
  50.         energy -= 20;
  51.     }
  52.  
  53.    return 0;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement