- Create a main method that...
- implements a game loop
- asks for user input
- writes output to the console
- calls VirtualPetShelter's tick method after each interaction
- Avaliable user interface actions should include (at minimum)
- feeding all the pets
- watering all the pets
- playing with an individual pet, which should display a list of pet names and descriptions, allowing a user to select one
- allow adoption of a pet, which should display a list of pet names and descriptions, allowing a user to select one
- allow intake of a pet. prompting the user for the pet's information
- include appropriate instance variables to store the pets who reside at the shelter
- include methods that:
- return a collection of all the pets in the shelter
- return a specific pet given its name
- allow intake of a homeless pet
- feed all of the pets in the shelter
- water all of the pets in the shelter
- plays with an individual pet in the shelter
- You will need to create a VirtualPet class.
- Create at least three instance variables (aka attributes aka properties aka fields).
- Create at least three methods (messages you send to your pet).
- Create a tick() method that represents the passage of time.
- Create a main method.
- implements a game loop.
- asks for user input.
- writes output to the console.
- Give the pet the ability to take care of some of its own needs.
Pets are not robots - they usually have some sort of self-determination! When tick() is called, you might want to have your pet take a look at its needs and address one, prioritizing whichever need is highest. You could also make your pet uncooperative - when the user tries to feed the pet, for example, you might make the pet refuse to eat if it is bored. Remember how we created an instance of the Random class to create a random number generator? You might want to incorporate that.
- Create a visual representation of your pet.
Rather than using numbers to convey your pet’s status, you could have some sort of visual representation of the pet. I.e., instead of printing hunger: 50, you could use smileys or ASCII art to show hunger when hunger >= 50.