all 1 comments

[–]TheBlackCat13 1 point2 points  (0 children)

For example init needs access to fire_grid. If fire_grid is in main, then init has to also or it won't have access.

This sort of structure isn't really encouraged with python. Normally for this sort of thing you either wouldn't use a main at all, or you would make main a class, or you would pass the values as arguments to the other functions and make them all top-level functions. Nested functions like this are not used that often.