Package 'tamRgo'

Title: Digital Pets for R
Description: Store a persistent digital pet on your computer and interact with it in your R console.
Authors: Matt Dray [aut, cre], Adriana De Palma [ctb]
Maintainer: Matt Dray <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-10-21 06:18:32 UTC
Source: https://github.com/matt-dray/tamRgo

Help Index


Clean Your Pet

Description

Clean dirt off your pet, which reduces your pet's 'dirty' status value by 1, down to a minimum of 0.

Usage

clean()

Value

Nothing.

Examples

## Not run: clean()

Feed Your Pet

Description

Give food to your pet, which reduces your pet's 'hungry' status value by 1, down to a minimum of 0.

Usage

feed()

Value

Nothing.

Examples

## Not run: feed()

Print Pet Statistics

Description

Print to the console your pet's current characteristics and status values.

Usage

get_stats()

Details

The output will show the following elements:

Name

Pet's user-provided name.

Species

Randomly-selected pet species.

Age

Days since born.

Level

Growth stage.

Alive

Is the pet alive?

Happy

Happiness on a scale of 0 to 5.

Hungry

Hunger on a scale of 0 to 5.

Dirty

Dirtiness on a scale of 0 to 5.

Value

Nothing.

Examples

## Not run: get_stats()

Generate a New Pet

Description

Lays an egg that contains a new digital pet who will live on your computer.

Usage

lay_egg(pet_name)

Arguments

pet_name

Character. A name for your new pet. Maximum eight characters.

Details

A persistent 'blueprint' file of your pet's characteristics will be saved to your computer. It will be saved as an RDS to the directory location given by tools::R_user_dir("tamRgo", which = "data"). You can only have store one blueprint at a time, so you can only have one pet at a time on your computer. .

Value

Nothing.

Examples

## Not run: lay_egg(pet_name = "KEVIN")

Play with Your Pet

Description

Play a game of chance with your pet, which increases your pet's 'happy' status value by 1, up to a maximum of 5.

Usage

play()

Value

Nothing.

Examples

## Not run: play()

Release Your Pet

Description

Release your pet into the world. Once released, they're gone forever.

Usage

release()

Details

Deletes the persistent 'blueprint' file of your pet's characteristics that's saved as an RDS in the directory location given by tools::R_user_dir("tamRgo", which = "data").

Value

Nothing.

Examples

## Not run: release()

See Your Pet

Description

Print to the console an image of your digital pet.

Usage

see_pet()

Details

The appearance of your pet is dependent on its species and level, which you can view with get_stats.

Value

Nothing.

Examples

## Not run: see_pet()