Skip to content

2022-Spring-Cohort/virtual-pet-jenniferadamsphoto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Required Tasks

VirtualPet class

  • 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.

VirtualPetApp class

  • Create a main method.
  • implements a game loop.
  • asks for user input.
  • writes output to the console.

Stretch Tasks

  • 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.

Virtual Pet Amuk:

Deliverables Support for 4 types of pets: Organic Cats, Organic Dogs, Robotic Cats, Robotic Dogs. Robots require oil and maintenance. Organic cats and dogs require cage & litter box cleaning. Allow users to take dogs on walks. Walking organic pets decreases the rate at which they soil their cages/litter boxes. Walking robotic pets increases their need for oil and maintenance.

Shelter Game: Welcome to Virtual Crab Shelter! We currently have 8 crabs to adopt and play with. Be careful, if all the crabs needs go down to zero, you will have to leave. Directions: Type 1 to feed all organic crabs Type 2 to give all organic crabs water Type 3 to give all organic crabs salt water Type 4 to clean organic crab cages Type 5 to charge all robotic crabs Type 6 to give all robotic crabs oil Type 7 to perform maintenance on all robotic crabs Type 8 if you would like to take the horseshoe crabs swimming Type 9 if you would like to interact with just one crab Type 10 if you want to add a crab to the shelter Type 11 if you would like to adopt a crab Type 12 to leave the shelter

About

virtual-pet-jenniferadamsphoto created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages