You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was following your tutorial (thanks a lot for it) and I've noticed that the code in part 3 is not generating a map and this is due to the fact that there's an iteration on an empty list which, for what I understood, python simply skips it.
I found that the code in question is running a for/else loop. I initially experienced the same problem as well, but discovered I coded it incorrectly. I was able to fix it like so:
for other_room in rooms:
...
else:
...
if num_rooms == 0:
...
Hello,
I was following your tutorial (thanks a lot for it) and I've noticed that the code in part 3 is not generating a map and this is due to the fact that there's an iteration on an empty list which, for what I understood, python simply skips it.
Details:
roguelike_tutorial_revised/map_objects/game_map.py
Line 34 in 51d13b8
The text was updated successfully, but these errors were encountered: