Raveesh Agarwal
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. 🤗

--

--

Raveesh Agarwal
Raveesh Agarwal

Written by Raveesh Agarwal

Entrepreneur, software craftsman and technology enthusiast, I continue to solve problems and grow with my projects, partnerships and endeavors.

No responses yet