View Single Post
Old Jun 3rd, 2005, 10:36 PM   #29
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
Is there a particular reason to shoot the cat nine times?

int bullets = 9;
while( alive ){
     while( cat_not_wailing )
          sleep();
     wake_up();
     aim();
     if (bullets > 0) {
     shoot_cat();
     bullets--;
     rejoice();
     go_to( bed );
   } else {
     go_to( work);
     buy_bullets(9);
     bullets = 9;
   }
}

You have to be economical! Bullets cost money!

The use of the bullets variable is purely for readability. It should be handled by the shoot_cat and buy_bullets function.

Did you have cat massacres on DevShed? Care to clarify the sticky issue? I suppose I should search for that...I've had some downtime getting Gentoo going.
Dameon is offline   Reply With Quote