def trophy0 (self,user):
     values_trophy0 = [1,5,8,10,15,25]
     manager = User_manager ()
     self.nb_of_friends = manager.get_nb_friends(user)
     i = 0
     while i<len(values_trophy0) and self.nb_of_friends >= values_trophy0[i]:
         self.unlock_trophy (0)
         i+=1
 def get_points_friends(self, Email):
     manage = User_manager()
     friends = manage.get_friends_name(Email)
     for i in range (len(friends)-1):
         self.get_trophies(friends[-1][i])
         friends[i].append(self.get_points())
     del friends[-1]
     return friends
 def get_trophies (self, user):
     manager = User_manager ()
     nb_of_friends = manager.get_nb_friends(user)
     print (nb_of_friends)
     
     self.__trophies = [0]* 6
     self.trophy0(user)
     self.trophy1(user)
     
     self.trophy2(user)
     self.trophy3(user) 
     self.trophy4(user)
     self.trophy5(user)
     return self.__trophies
Exemple #4
0
# 程序入口,包括注册和登录

from User_manager import *
from Re_manager import *
from Em_manager import *
print('欢迎使用员工信息管理系统')
print('-' * 32)
print('1:注册用户 | 2:登录用户')
um = User_manager()
re = Re_manager()
num = int(input(''))
if num == 1:
    user = re.is_user()
    passwd = re.is_passwd()
    um.register(user, passwd)
if num == 2:
    user = re.is_user()
    passwd = re.is_passwd()
    if um.verify(user, passwd):
        em = Em_manager()
        em.run()
    else:
        print('退出当前程序')