One more bit of housekeeping before we get into writing our game. Let’s make a “main block” for the startup of our program.
import arcade if __name__ == '__main__': print(arcade.RELEASE)
- Difference between running a file and importing a file
- How to tell the difference? The “main block”
- Also nice: PyCharm’s gutter icon
- Instead of code under the
if, make a function
mainwith the code, then call it from the main block.