Beispiel #1
0
def worldLoop(window):
    logger = Logger()

    # Add room, player, and npc to world
    level = Level()
    level.generateLevel()

    player = Player('TerminusSTC', 100, 100, 'Slytherin', logger)
    level.addEntityToRoom(player, 'great_hall', [12, 9])

    h_student = NPC('student')
    level.addEntityToRoom(h_student, 'great_hall', [12, 12])

    ui = UI(window, player, level, logger)
    cmd_parser = CmdParser(ui, player, level)
    while True:
        ui.render()
        cmd = ui.getCommand()
        cmd_parser.parseCmd(cmd)
Beispiel #2
0
 def _render_ui(self, ui: UI):
     ui.render(self._screen)