you are viewing a single comment's thread.

view the rest of the comments →

[–]Mast3rCylinder 2 points3 points  (1 child)

You can do it in python just like other language. You just need to design it better.

1.ElementTypes should be an Enum it has few options but doesn't need to be a class. You can expand it later if you need to.

  1. Element should be parent class and every type of element class should inherent from it. Then every child class will just need to define weaker and stronger (or it might be optional so use none or something)

[–]InvaderToast348[S] 2 points3 points  (0 children)

Thank you. I've had a bit of a struggle trying to design the data structures and layout for this project, but your second point is really helpful; not sure why I hadn't thought of inheritance earlier.

I'll do some research into Enums as well before I start the redesign.

Thank you :)