Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 9th, 2012  |  syntax: C++  |  size: 0.58 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. void Miguel::liveLife()
  2. {
  3.         try
  4.         {
  5.                 while(isLiving())
  6.                 {
  7.                         if(Day::GetCurrentDay().isAWeekDay())
  8.                         {
  9.                                 wakeUp();
  10.                                 getReadyForSchool();
  11.                                 goToSchool();
  12.                                 goHome();
  13.                                 goOnComputer();
  14.                                 sleep();
  15.                         }
  16.                         else
  17.                         {
  18.                                 wakeUp();
  19.                                 goOnComputer();
  20.                                 sleep();
  21.                         }
  22.                 }
  23.         }
  24.         catch(DepressedException& e)
  25.         {
  26.                 cryAbout(e.what());
  27.                 listenToMusic();
  28.         }
  29.         catch(BoredemException& e)
  30.         {
  31.                 watchYouTube();
  32.                 playGames();
  33.                 listenToMusic();
  34.         }
  35.         // Any other problems?
  36.         catch(...)
  37.         {
  38.                 // No worries, there's always music!
  39.                 listenToMusic();
  40.         }
  41. }