[Tutor] Modularity
kay Cee
unee0x at gmail.com
Wed Jan 13 22:56:40 EST 2016
Recently I've decided to write a pong style game with pygame; however, I can't seem to modularize the game successfully.
I'm looking to make individual modules for each class eg. Ball, Paddle,bounds, Game, Physics and Logic.
Used like this :
ball = Ball(), paddle = Paddle() and etc...
In a Game class...
Mainly, I get errors that say class is not defined..
My questions are what is the best way to achieve this and what is the best way to import yourClass?
So far I've tried:
Import class as class,
From class import*,
Import class
Sent from my iPhone
More information about the Tutor
mailing list