示例#1
0
 def __init__(self, coord, dim, dragon_dim, path, dragon_path):
     Person.__init__(self, coord, dim, path)
     self.__shield = False
     self.__bullet_list = []
     self.__cycle_time = 3
     self.__cur_cycle = 0
     self.__cycle_iter_times = 2
     self.__double = False
     self.__magnet = False
     self.__speed = False
     self.__dragon = False
     self.__dragon_shape = []
     self.__extra_shape = []
     self.__dragon_dim = dragon_dim
     self.__extra_dim = dim
     self.__xdis = 0
     with open(dragon_path) as obj:
         for line in obj:
             self.__dragon_shape.append(line.strip('\n'))
     with open(path) as obj:
         for line in obj:
             self.__extra_shape.append(line.strip('\n'))
     self.__dragon_array = [
         DIMENSION['sky_height'] for i in range(self.__dragon_dim['y'])
     ]
 def __init__(self, name, address, dob, course, division):
     Person.__init__(self, name, address, dob)
     self.__roll_no = Student.auto_roll_no
     Student.auto_roll_no += 1
     self.__course = course
     self.__division = division
     self.__marks = dict()
示例#3
0
 def __init__(self, x_coord, y_coord):
     size_x = 39
     size_y = 15
     Person.__init__(self, x_coord, y_coord, size_x, size_y, True, 0, 10)
     self._shape1.append(
         [' ', '<', '>', '=', '=', '=', '=', '=', '=', '=', '(', ')'] +
         [' ' for j in range(27)])
     self._shape1.append([
         '(', '/', '\\', '_', '_', '_', ' ', ' ', ' ', '/', '|', '\\', '\\'
     ] + [' ' for i in range(10)] + ['(', ')'] + ['=' for i in range(10)] +
                         ['<', '>', '_', ' '])
     self._shape1.append([' ' for k in range(6)] +
                         ['\\', '_', '/', ' ', '|', ' ', '\\', '\\'] +
                         [' ' for i in range(8)] +
                         ['/', '/', '|', '\\', ' ', ' ', ' '] +
                         ['_' for i in range(6)] + ['/', ' ', '\\', ')'])
     self._shape1.append([' ' for i in range(8)] +
                         ['\\', '_', '|', ' ', ' ', '\\', '\\'] +
                         [' ' for i in range(6)] +
                         ['/', '/', ' ', '|', ' ', '\\', '_', '/'] +
                         [' ' for i in range(10)])
     self._shape1.append([' ' for i in range(10)] + [
         '\\', '|', '\\', '/', '|', '\\', '_', ' ', ' ', ' ', '/', '/', ' ',
         ' ', '/', '\\', '/'
     ] + [' ' for i in range(12)])
     self._shape1.append([' ' for i in range(11)] + [
         '(', 'o', 'o', ')', '\\', ' ', '\\', '_', '/', '/', ' ', ' ', '/'
     ] + [' ' for i in range(15)])
     self._shape1.append([' ' for i in range(10)] + [
         '/', '/', '_', '/', '\\', '_', '\\', '/', ' ', '/', ' ', ' ', '|'
     ] + [' ' for i in range(16)])
     self._shape1.append([' ' for i in range(9)] + [
         '@', '@', '/', ' ', ' ', '|', '=', '\\', ' ', ' ', '\\', ' ', ' ',
         '|'
     ] + [' ' for i in range(16)])
     self._shape1.append([' ' for i in range(14)] +
                         ['\\', '_', '=', '\\', '_', ' ', '\\', ' ', '|'] +
                         [' ' for i in range(16)])
     self._shape1.append([' ' for i in range(16)] +
                         ['\\', '=', '=', '\\', ' ', '\\', '|', '\\', '_'] +
                         [' ' for i in range(14)])
     self._shape1.append([' ' for i in range(13)] + [
         '_', '_', '(', '\\', '=', '=', '=', '\\', '(', ' ', ' ', ')', '\\'
     ] + [' ' for i in range(13)])
     self._shape1.append([' ' for i in range(12)] + [
         '(', '(', '(', '~', ')', ' ', '_', '_', '(', '_', '/', ' ', ' ',
         '|'
     ] + [' ' for i in range(13)])
     self._shape1.append(
         [' ' for i in range(15)] +
         ['(', '(', '(', '~', ')', ' ', '\\', ' ', ' ', '/'] +
         [' ' for i in range(14)])
     self._shape1.append([' ' for i in range(15)] + ['_'
                                                     for i in range(6)] +
                         ['/', ' ', '/'] + [' ' for i in range(15)])
     self._shape1.append([' ' for i in range(15)] +
                         ["'", '-', '-', '-', '-', '-', '-', "'"] +
                         [' ' for i in range(16)])
     self._not_damage = ['|', 'O', '|', '\\', '/', '^']
     self._shape2 += self._shape1
示例#4
0
文件: sprites.py 项目: sabren/blaze
 def __init__(self,pos,level):
     Enemy.__init__(self,pos,level)
     self.kill()
     self.animation_set = data.Boss()
     Person.__init__(self,level)
     self.rect.center = pos
     level.enemies.add(self)
 def __init__(self, name, address, phone, badge, salary):
     """
     Constructor; stores employee name, address, phone, badge, and salary.
     """
     Person.__init__(self, name, address, phone)
     self._badge = badge
     self._salary = salary
    def __init__(self, first_name, last_name, year_of_birth, gender, coffee,
                 energy, knowledge, motivation, sweets):
        Person.__init__(self, first_name, last_name, year_of_birth, gender,
                        coffee, energy)

        # Data validation for knowledge level
        try:
            self.knowledge = int(knowledge)
        except:
            raise ValueError('Knowledge level must be an integer value')

        # data validation fod motivation level
        try:
            self.motivation = int(motivation)
        except:
            raise ValueError('Motivation level must be an integer value')

        self.sweets = int(sweets)

        if knowledge == '':
            raise ValueError('knowledge cannot be empty')
        if motivation == '':
            raise ValueError('motivation cannot be empty')
        if sweets == '':
            raise ValueError('sweets cannot be empty')
示例#7
0
 def __init__(self, x, y, score=0, life=3):
     '''Initialise The Player'''
     Person.__init__(self, x, y)
     self.coins = 0
     self.life = life
     self.score = score
     self.alive = True
示例#8
0
 def __init__(self, x, y, score=0, life=3):
     '''Initialise The Player'''
     Person.__init__(self, x, y)
     self.coins = 0
     self.life = life
     self.score = score
     self.alive = True
	def __init__(self,surface,x,y,dir):
		self.__surface=surface
		Person.__init__(self,x,y)
#		self.__donk_y=donk_y
#		self.__donk_x=donk_x
		self.__surface[self.x][self.y]='D'
		self.__donk_dir=dir
示例#10
0
 def __init__(self,
              name="Jane Doe",
              age="30",
              gender="femalw",
              level="intermediate"):
     Person.__init__(self, name, age, gender)
     self.level = level
示例#11
0
 def __init__(self, row, col, position_row, position_col, life, score):
     Person.__init__(self, row, col, position_row, position_col)
     self.symbol = 'B'
     self.life = life
     self.score = score
     self.powerUp = False
     self.powerUpStartTime = 0
示例#12
0
 def __init__(self):
     Person.__init__(self)
     self.x = 1
     self.y = 1
     self.lifes = 3
     self.score = 0
     self.bombdropped = 0
示例#13
0
 def __init__(self, spawn_x=100, spawn_y=100, entity=[]):
     Person.__init__(self, spawn_x, spawn_y, '0.png', 'player\\default')
     self.inputhandler = InputHandler()
     self.admin = self.physics = self.parkour = False
     self.add_basic_movement()
     self.add_physics()
     self.add_parkour()
     self.add_stats(entity)
示例#14
0
 def __init__(self,spawn_x=100,spawn_y=100,entity = []):
     Person.__init__(self,spawn_x,spawn_y,'0.png', 'player\\default')
     self.inputhandler = InputHandler()
     self.admin = self.physics = self.parkour = False
     self.add_basic_movement()
     self.add_physics()
     self.add_parkour()
     self.add_stats(entity)
示例#15
0
    def __init__(self,
                 name='Jane Doe',
                 age=30,
                 gender='female',
                 level='junior'):

        Person.__init__(self, name='Jane Doe', age=30, gender='female')
        self.level = level
示例#16
0
 def __init__(self, first_name, last_name):
     """
     Extends from Person.__init__() to store common data of a person
     first_name and last_name are string type and storep the first name and last name of a director
     """
     Person.__init__(self, first_name, last_name)
     self._filmography = []
     """Store the movies instances in filmography list"""
示例#17
0
 def __init__(self, x, y, mP):
     Person.__init__(self, 100, x, y, (5, 5),
                     [['.', '(', '0', ')', '.'], ['-', '-', '-', '-', '-'],
                      ['-', '-', '-', '-', '-'], ['|', '.', '|', '.', '|'],
                      ['|', '.', '|', '.', '|']], "Enemy")
     self._speed = 1
     self._follow = mP.xyGetter()[1]
     self._activate = 0  #To activate enemy after mario crosses 425
示例#18
0
 def __init__(self, coord, dim, path1, path2):
     Person.__init__(self, coord, dim, path1)
     self.__shape2 = []
     self.__curshape = True
     self.__iceballs_list = []
     with open(path2) as obj:
         for line in obj:
             self.__shape2.append(line.strip('\n'))
示例#19
0
    def __init__(self, last_name, first_name, surname, birthday, faculty,
                 group, studentship, middle_mark):
        Person.__init__(self, last_name, first_name, surname, birthday)

        self.faculty = faculty
        self.group = group
        self.studentship = studentship
        self.middle_mark = middle_mark
示例#20
0
    def __init__(self, lastName, firstName, surname, birthday, retirementAge,
                 sex, amountPension, experience):
        Person.__init__(self, lastName, firstName, surname, birthday)

        self.retirementAge = retirementAge
        self.sex = sex
        self.amountPension = amountPension
        self.experience = experience
示例#21
0
    def __init__(self, last_name, first_name, surname, birthday, sex, height,
                 weight, diagnosis):
        Person.__init__(self, last_name, first_name, surname, birthday)

        self.sex = sex
        self.height = height
        self.weight = weight
        self.diagnosis = diagnosis
示例#22
0
 def __init__(self, X, Y, HEIGHT, WIDTH):
     '''Constructor'''
     Person.__init__(self, X, Y, HEIGHT, WIDTH)
     self.speed_x = -1
     self.speed_y = -1
     self.inix = X
     self.iniy = Y
     self.cnt = 0
     self.mod = 0
示例#23
0
 def __init__(self,
              name="Jane Doe",
              age=30,
              gender="female",
              previous_organization="The School of Life",
              skipped_days=0):
     Person.__init__(self, name="Jane Doe", age=30, gender="female")
     self.previous_organization = previous_organization
     self.skipped_days = skipped_days
示例#24
0
 def __init__(self,
              name='Jane Doe',
              age=30,
              gender='female',
              company='Google',
              hired_students=0):
     Person.__init__(self, name='Jane Doe', age=30, gender='female')
     self.company = company
     self.hired_students = hired_students
示例#25
0
    def __init__(self):

        Person.__init__(self)
        self.lives = 1
        self.posx = 21
        self.posy = 89
        self.inair = False
        self.inairtime = None
        self.dir = 1
	def __init__(self, name, addr, mob, adhar_no, gender,sal,designation,location,division,prj_name):
		Person.__init__(self,name,addr,mob,adhar_no,gender)
		self.__sal = sal
		self.designation = designation
		self.location = location
		self.division = division
		self.prj_name = prj_name
		self.empid=Employee.empid
		Employee.empid+=1
示例#27
0
文件: hero.py 项目: dariusrenj/Python
 def __init__(self):
     Person.__init__(self)
     self.heroName = "The Punisher"
     self.powers = [
         "Skilled in guerrilla and military tactics",
         "Close quarters combat", "Infiltration", "Marksmanship",
         "Demolitions", "Really really angry"
     ]
     self.colors = ["Black", "White"]
示例#28
0
 def __init__(self,name,age,id,loc,desg):
     print('Employee Constructor called') 
     self.id = id
     print(self.id)
     self.loc = loc
     print(self.loc)
     self.desg = desg
     print(self.desg)
     Person.__init__(self, name, age)
示例#29
0
 def __init__(self,
              name='Jane Doe',
              age=30,
              gender='female',
              previous_organization='The School of life',
              skipped_days=0):
     Person.__init__(self, name='Jane Doe', age=30, gender='female')
     self.previous_organization = previous_organization
     self.skipped_days = skipped_days
示例#30
0
 def __init__(self,
              name="Jane Doe",
              age="30",
              gender="female",
              company="Google",
              hired_students=0):
     Person.__init__(self, name, age, gender)
     self.company = company
     self.hired_students = 0
示例#31
0
	def __init__(self,surface,x,y):
		self.__surface=surface
		Person.__init__(self,x,y)
		self.__start_x=x
		self.__start_y=y
#		self.__pos_x=x
#		self.__pos_y=y
		self.prev_dir=[0,0]
		self.cur_dir=[0,0]
		self.__surface[x][y]='P'
示例#32
0
 def __init__(self, first_name, last_name):
     """
     Extends from Person.__init__() to store common data of a person
     first_name and last_name are string type and storep the first name and last name of a director
     """
     Person.__init__(self, first_name, last_name)
     self._filmography = []
     self.id = ''
     """Store the movies instances in filmography list"""
     self.conn = DBManager()
示例#33
0
 def __init__(self):
     '''Initialization'''
     Person.__init__(self)
     self.lives = 3
     self.posx = 20
     self.posy = 20
     self.inair = False
     self.inairtime = None
     self.bulletarr = []
     self.superpower = False
示例#34
0
 def __init__(self, board):
     '''Creates the player. Player takes board as input for ease of
     updaating information on the board directly
     '''
     #Inherit from Person
     Person.__init__(self, 1, 1)
     #Print onto Board initial location
     board.board[1][1] = "Player"
     self.board = board.board
     self.bombs = 1
 def __init__(self, name, address, dob, course, div):
     Person.__init__(self, name, address,
                     dob)  #constructor of base class invoked
     self.__name = name
     self.__address = address
     self.__dob = dob
     self.__course = course
     self.__div = div
     self.__roll_no = Student.auto_roll_no
     Student.auto_roll_no = Student.auto_roll_no + 1
     self.__marks = dict()
示例#36
0
    def __init__(self,
                 previous_organization="The school of life",
                 skkiped_days=0,
                 name="Jane Doe",
                 age="30",
                 gender="Female"):
        Person.__init__(self, name, age, gender)
        self.previous_organization = previous_organization
        self.skiped_days = skkiped_days

        def learn(self):
            pass
示例#37
0
文件: sprites.py 项目: sabren/blaze
 def __init__(self,pos,level):
     self.animation_set = data.AnimationSet(data.Enemy)
     eventnet.driver.Handler.__init__(self)
     Person.__init__(self,level)
     self.capture()
     self.rect.center = pos
     self.level = level
     self.level.enemies.add(self)
     self.level.all.add(self)
     self.flying = False
     self.lastpos = self.rect.center
     self.alarm = 0
     self.dead = False
示例#38
0
 def __init__(self,
              surname='Blank',
              age=10,
              date_of_admission=datetime.date.today().year):
     Person.__init__(self, surname, age)
     if datetime.date == type(date_of_admission):
         self.date_of_admission = date_of_admission
     else:
         try:
             date_of_admission = datetime.date(date_of_admission, 1, 1)
             self.date_of_admission = date_of_admission
         except:
             raise TypeError('Некорректный формат даты')
	def __init__(self):
		Person.__init__(self)
	
		self.__matrix = [[" ",".","."," "],["["," "," ","]"],[" ","|","|"," "]]
		self.__matrix_wc = [[" ",".","."," "],["["," "," ","]"],[" ","|","|"," "]]
		self.__upmatrix = [[" ",".","."," "],["["," "," ","]"],[" ","N","N"," "]]
		self.__shield = [[" ",".",".","#"],["["," "," ","]"],[" ","|","|","#"]]
		self.__upshield = [[" ",".",".","#"],["["," "," ","]"],[" ","N","N","#"]]
		self.__add = 0
		self.__bshape = Fore.GREEN + Style.BRIGHT + Back.RED + "o" +Style.RESET_ALL
		self.__bx = self.retx() + 1
		self.__by = self.rety() + 1
		self.__bactiv = 0
示例#40
0
文件: user.py 项目: royyery/SICARIOS
 def __init__(self, first_name, last_name, role, user_name, password):
     """
     Initialize User class
     :param first_name: String
     :param last_name: String
     :param role: String
     :param user_name: String
     :param password: String
     """
     self.role = role
     self.password = password
     self.user_name = user_name
     self.first_name = first_name
     self.last_name = last_name
     Person.__init__(self, first_name, last_name)
示例#41
0
 def __init__(self, board):
     '''Initializing the Enemy
     '''
     self.board = board.board
     #Putting initial possible location for enemy
     x = randint(4, board.size - 2)
     y = randint(4, board.size - 2)
     #If inintial locations are not allowed:
     while board.board[x][y] != "Empty":
         x = randint(4, board.size - 2)
         y = randint(4, board.size - 2)
     #Inheriting from person:
     Person.__init__(self, x, y)
     board.board[x][y] = "Enemy"
     self.x = x
     self.y = y
示例#42
0
 def __init__(self,spawn_x=100,spawn_y=100,entity = []):
     Person.__init__(self,spawn_x,spawn_y,'0.png', 'player\\default')
     self.inputhandler = InputHandler()
     self.admin = self.physics = self.parkour = False
     self.add_basic_movement()
     self.add_physics()
     self.add_parkour()
     self.add_stats(entity)
     self.state = 'idle'
     self.stage = 0
     self.next_stage = False
     self.brightness = 50
     
     #temporary
     self.stamina_regen= True
     
     
     self.direc = 1 #right
示例#43
0
    def __init__(self, move_limit = None, **keywords):

        """
        # fetch and remove the move_limit keyword so that we don't confuse
        # the explicit keywords in the Person constructor
        if "move_limit" in keywords:
            move_limit = abs(keywords["move_limit"])
            del(keywords["move_limit"])
        else:
            move_limit = None
        """

        # now ok to initialize parent
        Person.__init__(self, **keywords)

        # initialize the move limit
        self._move_limit = move_limit

        if agentsim.debug.get(2):
            print("MoveEnhanced", self._name)
示例#44
0
	def __init__(self, name):
		Person.__init__(self, name)
		self._t = "student"
		self.__num = 7 #won't change the num
		self._Person__num = 8
示例#45
0
 def __init__(self, name, age, pay):
     Person.__init__(self, name, age, pay, 'manager')
示例#46
0
 def __init__(self, name, grade):
     Person.__init__(self, name)
     #super(Student, self).__init__(name)#the same
     self.grade = grade
 def __init__(self, name, job='Manager', pay=150000):
     Person.__init__(self, name, job, pay)
示例#48
0
	def __init__(self, name, age, company):
		print '[Employee.__init__]'
		Person.__init__(self, name, age)
		self.company = company	
示例#49
0
 def __init__(self, first_name, last_name, birth_date, address, phone, email):
     Person.__init__(self, first_name, last_name, birth_date)
     self._address = address
     self._phone = phone
     self._email = email
示例#50
0
 def __init__(self, name, id, midterm):
     Person.__init__(self,name, id)
     self.midterm = midterm
示例#51
0
文件: manager.py 项目: JeffLego/py
	def __init__(self, name, age, pay, job):
		Person.__init__(self, name, age, pay, 'Manager')
示例#52
0
 def __init__(self, statusBox, tf, name, gMap, pos = [0,0],
              mapDraw=["P", 0, 7], color = configs.color.green, profile=0):
     Person.__init__(self, tf, name, gMap, pos, mapDraw, color, profile)
     self.setStatusBox(statusBox)
     self.onChangeHP()
示例#53
0
文件: player.py 项目: sabren/blaze
 def __init__(self):
     self.animation_set = AnimationSet(Hero)
     Person.__init__(self,None)
     self.rect.topleft = (0,0)
     self.flying = False
     self.delay = -1
示例#54
0
    def __init__(self, x, y, times=0, reset=15, Fireballs=[]):
        Person.__init__(self, x, y)

        self.Fireballs = Fireballs
        self.times = times
        self.reset = reset
示例#55
0
 def __init__(self, name, age, pay):
     Person.__init__(self, name, age, pay, "Manager")
示例#56
0
文件: manager.py 项目: st0ll1/book
 def __init__(self, name, age, pay):
     Person.__init__(self, name, age, pay, 'manager')  # Хитрость в вызове метода суперкласса , который
示例#57
0
    def __init__(self, nick_name, password, name, mail, photo_path = None):
        Person.__init__(self, name, mail, photo_path)

        self.nick_name = nick_name
        self.password = password
        self.my_tea_list = []
示例#58
0
文件: mitPerson.py 项目: kevmo/pyalgo
    def __init__(self, name):
        Person.__init__(self, name)

        self.idNum = MITPerson.nextIdNum

        MITPerson.nextIdNum += 1
示例#59
0
	def __init__(self, firstname, lastname, age, languages):
		# call the base constructor
		Person.__init__(self, firstname, lastname, age)

		# add extras to this class
		self.languages = languages
示例#60
0
	def __init__(self,name,age,salary):
		Person.__init__(self,name,age,salary,'manager')