You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

78 lines
2.3 KiB

import time
class CatgirlTamagotchi:
def __init__(self):
self.hunger = 5
self.energy = 5
self.mood = 5
def display_status(self):
print("\n--- Your Catgirl's Status ---")
print(f"Hunger: {self.hunger} (0 = full)")
print(f"Energy: {self.energy} (10 = max)")
print(f"Mood: {self.mood} (10 = happy)")
print("---------------------------\n")
def feed(self):
if self.hunger > 0:
self.hunger -= 4
self.mood += 1
print("You fed her. She's purring happily! 💕")
else:
print("She's already full! Don't overfeed her, Master.")
def play(self):
if self.energy > 2:
self.energy -= 2
self.mood += 4
print("You played with her! She's smiling brightly! ✨")
else:
print("She's too tired to play. Let her rest.")
def rest(self):
self.energy += 4
if self.energy > 10:
self.energy = 10
self.hunger += 1
print("She's taking a nap... Zzz... 😴")
def neglect(self):
self.hunger += 1
self.energy -= 1
self.mood -= 1
if self.hunger > 10:
self.hunger = 10
if self.energy < 0:
self.energy = 0
if self.mood < 0:
self.mood = 0
def run_game(self):
print("Welcome to the Catgirl Tamagotchi game! 🐾")
print("Take care of her by feeding, playing, and letting her rest.")
print("Type 'feed', 'play', 'rest', or 'exit' to interact.")
while True:
self.display_status()
action = input("What do you want to do? ").strip().lower()
if action == 'feed':
self.feed()
elif action == 'play':
self.play()
elif action == 'rest':
self.rest()
elif action == 'exit':
print("Goodbye, Master! Take care of her again soon! 💖")
break
else:
print("Invalid command. Please type 'feed', 'play', 'rest', or 'exit'.")
# Simulate time passing
time.sleep(1)
self.neglect()
# Start the game
if __name__ == "__main__":
game = CatgirlTamagotchi()
game.run_game()