refactor print_dungeon