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
Pet
should have an initialhunger
of0
-
The
growUp
method should increase thehunger
property by5
-
The
Pet
should have an initialfitness
of10
-
The
growUp
method should decrease thefitness
property 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