Getting Older, Getting Unhealthier - ;TLDR
Now that your pet can get older, it can also begin to feel the effects of age.
Your challenge in this step is to adapt the Pet function so that growing up also makes it hungrier and less fit.
This can be broken down into steps:
-
The
Petshould have an initialhungerof0 -
The
growUpmethod should increase thehungerproperty by5 -
The
Petshould have an initialfitnessof10 -
The
growUpmethod should decrease thefitnessproperty by3
To complete this challenge, you will need to:
-
test the expected behaviour in the Node CLI
-
write unit tests to to cover the expected behaviour
-
implement the code to make the tests pass
Once you are done, commit your work and push to GitHub