0
Goblin Game Object Structure
Extending the Goblin Game concept again, I tried experimenting with how I’d create and inherit the objects and their classes within the game. As a beginner, only one month old, I would be interested in peoples observations and suggestions! Thanks! I included any of the methods in order to just focus on the class structure. https://code.sololearn.com/ci49xN4cAQGm/?ref=app
3 Réponses
+ 1
One thing, encapsulate your call code under the structure
If __name__ == '__main__':
YourCode
It is being done when you're importing that code from other module to prevent to be run. I think that is a good practice to include it in your code.
+ 1
I accidentally posted in the wrong thread. 😅
0
HonFu where is the class hand in this code? There are Foe, GameObject.... but I am not able to find Hand class.
in GameObject there is declared a class attribute, but I think is OK. I've not checked the whole code.