From 1822ae0a07fb8d04099e429afa47f62dfbd17031 Mon Sep 17 00:00:00 2001 From: LeightonGinty <57670831+LeightonGinty@users.noreply.github.com> Date: Sun, 17 Nov 2024 00:34:26 +0000 Subject: Update alcogotchi.py Add realistic units per drink selection --- alcogotchi-server/alcogotchi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'alcogotchi-server/alcogotchi.py') diff --git a/alcogotchi-server/alcogotchi.py b/alcogotchi-server/alcogotchi.py index 4b2a1c1..6b2d273 100644 --- a/alcogotchi-server/alcogotchi.py +++ b/alcogotchi-server/alcogotchi.py @@ -12,6 +12,7 @@ class Alcogotchi: self.health = 100 self.alco_coin = 100 self.items = {} + self.beverages = {"beer": 2.5, "wine": 3, "whisky": 2, "lemonade": 0} def get_alcogotchi(self): return self.__dict__ @@ -30,7 +31,9 @@ class Alcogotchi: self.items[item] += 1 else: self.items[item] = 1 - def drink(self): + def drink(self, data): + drink_choice = data["drink"] + self.drunk += beverages[drink_choice] if self.last_drunkentime + 60 < time.time(): self.last_drunkentime = time.time() self.drunk += 10 -- cgit v1.2.3-70-g09d2