def __init__(self): self.heroRace = Race() self.heroClass = "" #Получаем Данные от пользователя self.getName() self.getClass() self.getRace() super().__init__(self.name, self.heroRace.stats, Elements(), 0) ## Инвентарь героя self.inventory = Inventory() ## Обмундирование героя self.equipment = Equipment() ## Карман с Лечебками героя self.potionsPocket = PotionsPocket()
def main(): employee = Employee.Employee("Steve Jobs", 1) employee.setTitle("CEO") location = Location.Location() purchase = Purchase.Purchase(time.time(), "Walmart", time.time()) equipment = Equipment.Equipment(purchase, 1234, "Computer", "FFD123", "1134D") location.addEmployee(employee) employee.setLocation(location) location.addEquipment(equipment) equipment.setAssignee(employee) employee.addEquipment(equipment) coordinates = Coordinate.Coordinate() coordinates.setAddress("One Redmond Way, Redmond, WA") coordinates.setCellPhone("(206) 246-1342") coordinates.setWorkPhone("(425) 422-1356") employee.setCoordinates(coordinates) equipment.setLocation(location) location.setMaintenanceEmployee(employee) employee.setSupervisor(employee) location.prettyPrint()
import pygame import config import Player import Terrain import Equipment import showcoords pygame.init() window = pygame.display.set_mode((config.screen_width, config.screen_height)) pygame.display.set_caption("Minecraft2D") terrain = Terrain.Terrain() player = Player.Player(terrain) equipment = Equipment.Equipment() def update(ev): player.update(ev, terrain, equipment) equipment.update(ev) def draw(): window.fill((0, 0, 0)) terrain.draw(window, player) player.draw(window) equipment.draw(window) showcoords.draw(window, player) terrain.create_terrain()