1 min readJun 19, 2019
Bhaiya, it’s so good to see you covering the much needed design patterns!
There is one more possibility now. Make long jump and short jump as mixins that implement jump behavior and kick behavior interfaces.
And do something like
class Paul extends Fighter implements JumpBehavior with LongJump{}
This will also be a strategy pattern, if we don’t want the person writing runtime code to worry about this. 🤗