Пример #1
0
 def login(self, email, password):
     """
     Login user to Producteev.
     """
     response = self.__request(
                     'users/login',
                     email=email,
                     password=password)
     self.token = response['login']['token']
     self.users = Users(self)
     self.tasks = Tasks(self)
     self.dashboards = Dashboards(self)
     self.labels = Labels(self)
     self.activities = Activities(self)
     self.subtasks = Subtasks(self)
Пример #2
0
from pprint import pprint
from location import Location
from activities import Activities
from inventory import Inventory
from enemies import Enemies
loop = True

activities = Activities()

inventory = Inventory()

location = Location()

enemies = Enemies()

while loop:

    print('You are at ' +
          str(location.get_current_region_text(inventory, activities)))

    if inventory.playerInventory['health'] <= 0:
        print('You died!')
        print('You had ' + str(inventory.playerInventory['EXP']) + ' EXP!')
        loop = False
    else:
        print('Your health is ' + str(inventory.playerInventory['health']))

    if inventory.playerInventory['house']:
        if activities.inventory_new_recipes == 'Unchecked':
            print('New crafting recipes learned!')