forked from spitsfire/adadachi-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.py
50 lines (36 loc) · 1.79 KB
/
player.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from constants import STATUS
import random
class Player:
def __init__(self):
self.adadachi = None #when games, this becomes player.adadachi
self.inventory = {
"games": ["hide-n-seek", "tag", "go fish", "red rover"],
"foods": ["banana cream pie", "carrot sticks", "mashed potatoes", "mac 'n cheese", "tater tots", "chocolate cake", "strawberries", "fried rice"],
}
def play_with_adadachi(self):
pass
#if fav_game is chosen, raise happiness point by 2
#if hates_game is chosen, minus 2 points
#if any other of the games is chosen, raise happiness by 1
def print_feed(self, favorite_food, least_favorite_food):
food_menu = ",".join(self.inventory["foods"])
print(f'Favorite Food: {favorite_food}')
print(f'Least Favorite Food: {least_favorite_food}')
food_to_feed = input(f'What would you like to feed {self.adadachi.name}? The menu includes {food_menu}')
return food_to_feed
def feed(self):
favorite_food = self.inventory["foods"][self.adadachi.personality_favorites()]
least_favorite_food = self.inventory["foods"][self.adadachi.personality_hates()]
food_to_feed = self.print_feed(favorite_food, least_favorite_food)
if food_to_feed.lower() == favorite_food:
self.adadachi.happiness += 2
self.adadachi.hunger -= 1
if food_to_feed.lower() == least_favorite_food:
self.adadachi.happiness -= 2
self.adadachi.hunger += 1
def clean(self):
pass
def get_status(self):
print(self.adadachi.name,"has a hunger level of",self.adadachi.hunger,
"\na happiness level of", self.adadachi.happiness,
"\na poop level of",self.adadachi.poop_lvl)