Coder Social home page Coder Social logo

virtual-pet-amok's Introduction

virtual-pet-amok

Virtual Pets AMOK

Project Map:

This project takes on a similar design to the Virtual-Pet-Shelter project with the addition of extended child classes for cat, organic dog and robot dog.

The virtual pet shelter class has methods for feeding all of the pets, giving water to all of the pets, walking the dogs, cleaning the cages, cleaning the litterbox, adopting a pet, and admitting a pet. Calling the feed all and water all methods will decrease their hunger and thirst levels but increase their sleep level and the amount of waste in the dog’s cage and in a cat's litterbox. There is a tick method set for calling for all individual pet tick methods. All virtual pets are stored in a map/collection.

The class virtual pet allows for interaction with each of the animals of creation of an organic cat, an organic dog, and a robot dog. All virtual pets share Health, playing and boredom traits. Boredom will go down if playing gets too high. All pets start out with default stats. Tick method and play method are housed here.

The dog instance variable contains the walk method which increases happiness for all dogs.

The organic cat class contains new instance variables for hunger and thirst. Health is affected when hunger and thirst levels are too low.

The organic dog class extends the virtual pet class and implements the organic interface which contains the methods for feeding and giving water to all organic pets, and contains new instance variables for hunger, thirst, and amount of waste. Health is affected when hunger/thirst levels are too low and amount of waste is too high. Clean cage method is introduced to reduce the amount of waste in a dogs cage. Walk method also reduces the amount of waste in a cage.

The robot dog class extends the virtual pet class and implements the robotic interface which has method for oiling the pet and contains the new instance variable oil level. If oil level drops too low then health will be affected. Walk method will increase happiness in robot dogs.

The virtual pet shelter app will display a menu for options and the virtual pet status.

virtual-pet-amok's People

Contributors

gracenjoroge avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.