Hey y’all,
I have a bit of an organizational problem here. I want a character to have a set of abilities. Those abilities will share some data types (though the specific values will be unique, like the experience level) but each will also have several unique data types and functions.
For example, a simple hierarchical representation of this would be as follows:
-
Character
-
Abilities
-
Swimming
- member variables and functions
-
Running
- member variables and functions
-
Strength
- member variables and functions
- member variables and functions
-
Swimming
-
Abilities
Should Abilities be a struct containing classes for Swimming, etc as well as its own member functions/variables? Or perhaps a class that accesses the Swimming, etc classes and contains its own member variables and functions?
Or is there some completely different way you would recommend doing this?