JSPM

shibe-inu

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q18150F
  • License GPL-3.0

A pet simulator for a Shiba Inu dog with a state based model

Package Exports

  • shibe-inu
  • shibe-inu/shibeinu.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (shibe-inu) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ShibeInu Simulator

This is a Node.js module that allows you to simulate a Shiba Inu dog's behavior. You can feed it, play with it, and manage its needs.

Installation

You can install the module by running:

npm install shibe-inu-simulator

Usage

Import the ShibeInu and State classes from the module:

const { ShibeInu, State } = require('shibe-inu-simulator');

Create an instance of the ShibeInu class:

const myShibe = new ShibeInu();

You can then use the different methods available on the ShibeInu class to interact with your Shibe Inu:

myShibe.feed();
myShibe.play();
myShibe.sleep();
myShibe.wakeUp();
myShibe.cleanPoop();
myShibe.exercise();
myShibe.update();
console.log(myShibe.bark());
console.log(myShibe.wagTail());

State

The State object has the following keys:

  • AWAKE: "awake"
  • SLEEPING: "sleeping"
  • HUNGRY: "hungry"
  • EATING: "eating"
  • PLAYING: "playing"
  • POOPING: "pooping"
  • BORED: "bored"
  • ANGRY: "angry"
  • HAPPY: "happy"
  • WAGGING_TAIL: "wagging tail"
  • BARKING: "barking"

These can be used to compare to the current state of your Shiba Inu.

Methods

Here is a list of the methods you can call on a ShibeInu instance, along with a brief description:

  • feed(): Feeds the Shiba Inu, increasing its energy and setting its state to eating.
  • play(): Plays with the Shiba Inu, decreasing its energy and setting its state to playing.
  • sleep(): Puts the Shiba Inu to sleep, increasing its energy.
  • wakeUp(): Wakes up the Shiba Inu.
  • cleanPoop(): Cleans up after the Shiba Inu, resetting its poop amount and potentially improving its mood.
  • exercise(): Lets the Shiba Inu exercise, increasing its health and decreasing its energy.
  • update(): Updates the state of the Shiba Inu based on the current time.
  • bark(): Makes the Shiba Inu bark, if it's not sleeping and is either hungry, angry, or bored.
  • wagTail(): Makes the Shiba Inu wag its tail, if it's happy or playing.

Author

Harshad Joshi

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.