A user can interact with my programs in one of two ways: command line or through the web app. to be able to interact with pet.js through the command line you will need to install node.
The command line will then ask you what name you want to call your pet. your pet has three attributes: food, energy, or happiness
After you name the pet you can either play with it, feed it, let it sleep, leave for the day,come home. You can even battle the computer.
If you choose to do the battle option, the computer will generate a new pet object. It will then generate random values for the attributes.
It will then add all the values together for the your pet object and the computer pet object. If your sum is greater than the computer than you will win.
If not you will lose.
Depending on which one you choose your pet will increase or decrease food, energy, happiness.
The pet also has a power level. The pet starts out with a power level of 0. If your food, energy, and happiness gets to 10 your power level becomes 1. Your power level becomes 2 when your food , energy, and happiness hit the number 20. Your power level becomes 3 when your food,energy, and happiness hit 40. the level becomes 4 when your attributes hit 60. Lastly it your power level hits 5 when your attributes hit 100.
To interact with the pet object on the web just follow this link https://danieljanderson.github.io/pet/.
When the page loads you will be prompted to name your pet.
To interact with the pet all you would need to do is click on the button that you want to do. The results will be in the middle under the Food, energy, happiness, and power level. The picture on the upper left is a picture the repersents the power level of your pet. The picture on the right represents the activity that you chose.
You will need to install node.js
It will then prompt you what activities you would like to do with your pet.