Welcome to your very own Digital Pet Playground, where cuteness meets code! This Python-based pet emulator lets you care for, play with, and train a virtual buddy โ and it's packed with personality. Whether youโre raising a cat, dog, bird, or even a turtle, this project brings your console to life ๐ถ๐ฑ๐ฆ๐ข.
To build an interactive terminal-based simulator using OOP concepts in Python. Users can create a pet and interact with it through various actions like feeding, playing, sleeping, and even teaching tricks!
| Feature | Description |
|---|---|
๐ถ name |
Every pet needs a name! Choose one or get a fun random suggestion. |
๐ hunger |
Tracks how hungry your pet is (0 = full, 10 = very hungry). |
โก energy |
Determines how active your pet is (0 = exhausted, 10 = fully rested). |
๐ฑ happiness |
The mood lifter โ the higher, the better! |
๐ experience |
Pets level up as they learn tricks and play games. |
๐ age |
Your pet grows over time (especially while sleeping). |
๐ง mood |
A dynamic attribute calculated from energy and happiness. |
๐ tricks |
Teach your pet new tricks and see their progress! |
Create your pet and interact through a simple terminal menu:
- ๐ Feed your pet
- โฝ Play with your pet
- โ๏ธ Teach your pet a trick
- ๐ Check your pet's status
- ๐ด Let your pet sleep
- ๐ Show known tricks
- ๐ฎ Play a mini-game
- โ Exit
---
## ๐ฅ Bonus Features
- ๐ฎ **Mini-Game**: Number guessing game that boosts happiness and XP!
- ๐ **Training System**: Teach tricks based on your petโs mood and energy.
- โค๏ธ **Favourite Food**: Feed your pet what it loves most for bonus happiness!
- ๐ด **Mood Mechanics**: Pet moods dynamically shift based on stats.
- ๐ง **Randomized Pet Names and Personalities** to keep it fresh every time.
---
## ๐ Tech Stack
- Python 3.x
- OOP Principles (Classes, Methods, Attributes)
- Random module
- Sleep/time simulation for realism
---
## ๐ Getting Started
1. Clone the repo:
```bash
git clone https://github.com/Denzelxo/Virtual-Pet-Simulator.git
cd virtual-pet-simulator
-
Run the simulator:
python main.py
-
Enjoy your digital buddy! ๐ฎ
โโโ main.py # Main game loop and user interface
โโโ pet.py # Pet class definition with all attributes and methods
โโโ Readme.md # Project documentation (this file!)
- Denzel Odhiambo
"You played with Luna! Luna is ecstatic! ๐"
"Luna has learned a new trick: Backflip!"
"Lunaโs current mood: Happy ๐"
- Object-Oriented Programming (OOP)
- State management in simulations
- Working with time delays and random events
- Writing interactive command-line applications
- Save/load pet profiles
- More interactive games
- Sound or graphical UI using Pygame