Exemple #1
0
 def __init__(self, size):
     """
     :param size: size of  the square map
     :type size: int
     """
     
     self.dun_map = dungeon_map_generate.generate_map(size)
def game():
    """
    :description: run dungeon game
    
    :return:
    :rtype:
    """

    set_debug_settings()

    size = int(input('Type map size \n'))
    dun_map = dungeon_map_generate.generate_map(size)
    position = dungeon_map_generate.set_player_randomly(dun_map)

    dungeon_logic.dungeon_logger.logger.info(
        f"Use following commands to navigate your position {dungeon_logic.COMMANDS}"
    )
    dungeon_logic.dungeon_logger.logger.info(
        "Use 'save' or 'load' commands to save/load game")

    game_state = 'ingame'
    while game_state == 'ingame':
        game_state = run_frame(dun_map, position)

    for row in dun_map:
        dungeon_logic.dungeon_logger.logger.info(row)