Wednesday, April 10, 2013

A working day's single routine

This function (AKA routine) models a kind of typical working day for a single man:

void doWorkingDay()
{
  wakeUp();
  if( today() == FRIDAY ) {
    getClothes( CASUAL );
  } else {
    getClothes( FORMAL );
  }
  for( int i = 0; i < 2; ++i ) {
    eat();
    work();
  }
  switch( today() ) {
    case MONDAY:
      getMovie();
      getTvSeries();
      break;
    case TUESDAY
      getSport();
      getTvSeries();
      break;
    case WEDNESDAY:
      getVideoGames();
      if( today() == WEDNESDAY )
        getTvSeries();
      break;
    case THURSDAY:
      onTv = true;
      getSport();
      getTvSeries();
      break;
    case FRIDAY:
      getParty();
      if( getGirl() == false ) {
        getTvSeries();
      }
      break;
    default:
      cout << "Come on! Working at weekend?" << endl;
      getBiers( 10 );
  }
  sleep( 7 * 3600 );
}


No comments:

Post a Comment