예제 #1
0
 public void walkedWithDog(boolean gettingDirty) {
   if ((getTime() - DogService.INSTANCE.getTimeLastWalked()) > THIRTYMINUTES) {
     DogService.INSTANCE.updateSatisfaction(10, 85);
     //            setView(DogMood.HAPPY);
   } else {
     DogService.INSTANCE.updateSatisfaction(-5, 60);
     //            setView(DogMood.SAD);
   }
   if (Math.random() < 0.75 && gettingDirty) {
     setDirty(true);
     //            setView(DogMood.DIRTY);
   }
   DogService.INSTANCE.setWantsToWalk(false);
 }