pade
pade copied to clipboard
Splits the behaviour inherit structure into simple and compound behaviours
I strongly suggest to accept this PR, because of future coding contributions and improvements. This PR splits the behaviours inherit structure into two major classes: SimpleBehaviour
and CompoundBehaviour
, both inheriting from the BaseBehaviour
in the pade.behaviours.base
module. The proper methods was moved to the respective classes. Some docstring also was added.
@italocampos could you explain the difference between Behaviour
, BaseBehaviour
and SimpleBehaviour
classes?
My question is more related if we could to merge Behaviour
and BaseBehaviour
and if we could remove SimpleBehaviour
in order to the "simple behaviours" (like OneShotBehaviour
, CyclicBehaviour
, etc) just extend BaseBehaviour
(or Behaviour
) directly.
To simplify the textual explanation, I will attach to this comment a class diagram with the proposed alterations. The previous version of the classes has many classes inheriting directly from BaseBehaviour
. During the development, it's possible to see that compound behaviours don't share the same activities with simple behaviours. This is the reason of this PR. You can ask me for more explanation if you need to. :)