def __init__(self): super().__init__() self.background = urwid.AttrMap(urwid.SolidFill(' '), 'bg') self.player = Player(Config.ARENA_WIDTH, Config.ARENA_HEIGHT) self.entities = [ Entity(Config.ARENA_WIDTH, Config.ARENA_HEIGHT) for _ in range(Config.ENEMIES) ] self.loop = urwid.MainLoop(self.__get_screen(), palette=Config.PALLETE, unhandled_input=self.handle_input)
def __init__(self): self.player = Entity() self.player.x = 10 self.player.y = 10 self.entities.append(self.player)