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()
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
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')
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
def __init__(self, name="Jane Doe", age="30", gender="femalw", level="intermediate"): Person.__init__(self, name, age, gender) self.level = level
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
def __init__(self): Person.__init__(self) self.x = 1 self.y = 1 self.lifes = 3 self.score = 0 self.bombdropped = 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)
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)
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
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"""
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
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'))
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
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
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
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
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
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
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
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"]
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)
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
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
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'
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()
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
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()
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
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
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
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)
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
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
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)
def __init__(self, name): Person.__init__(self, name) self._t = "student" self.__num = 7 #won't change the num self._Person__num = 8
def __init__(self, name, age, pay): Person.__init__(self, name, age, pay, 'manager')
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)
def __init__(self, name, age, company): print '[Employee.__init__]' Person.__init__(self, name, age) self.company = company
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
def __init__(self, name, id, midterm): Person.__init__(self,name, id) self.midterm = midterm
def __init__(self, name, age, pay, job): Person.__init__(self, name, age, pay, 'Manager')
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()
def __init__(self): self.animation_set = AnimationSet(Hero) Person.__init__(self,None) self.rect.topleft = (0,0) self.flying = False self.delay = -1
def __init__(self, x, y, times=0, reset=15, Fireballs=[]): Person.__init__(self, x, y) self.Fireballs = Fireballs self.times = times self.reset = reset
def __init__(self, name, age, pay): Person.__init__(self, name, age, pay, "Manager")
def __init__(self, name, age, pay): Person.__init__(self, name, age, pay, 'manager') # Хитрость в вызове метода суперкласса , который
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 = []
def __init__(self, name): Person.__init__(self, name) self.idNum = MITPerson.nextIdNum MITPerson.nextIdNum += 1
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
def __init__(self,name,age,salary): Person.__init__(self,name,age,salary,'manager')