def __init__(self):

        self.player = dun_player.Player()
        self.dun_map = dun_map.DungeonMap(5)

        dungeon_logger.logger.info('Default map size = 3\n')
        command = input("Press 'Y' to change map size\n")
        command.lower()
        if command == 'y':

            self.set_map_size()
Beispiel #2
0
    def set_map_size(self):
        """
        :description: created new map with user size
        """
        size = ""
        while size.isdigit() == False:

            size = input("Enter new map size\n")

        size = int(size)
        self.dun_map = dun_map.DungeonMap(size)
    def set_map_size(self):
        """
        :description: created new map with user size
        """
        size = ""
        while size.isdigit() == False:

            size = input("Enter new map size\n")

        try:
            size = int(size)
        except ValueError as error:
            dungeon_logger.logger(f'ValueError: {error}')
        self.dun_map = dun_map.DungeonMap(size)