The strategy design pattern can help make code more readable, maintainable when you need to be able to select an algorithm during the run time of a program. This is done through the use of polymorphism.
Firstly I show how code can be bad when not using it, and then show the same code, but written using the pattern in mind.
=========
SOURCE CODE:
=========
RESOURCES:
More info on strategy pattern:
=========
MUSIC USED:
Ken Silverman - PREPSONG -
Pokemon DP - Route 209 -
Banjo Kazooie - Main Title -
Banjo Kazooie - Pause Screen -
Orchard Media - Square Hill (Spyro) -
Tales of Phantasia - The Final Act -
Ken Silverman - DRIFSNG22 -
=========================================
LINKS:
GitHub:
Discord Server:
Support me on Patreon:
Follow me on Twitter:
Follow me on Twich:
Subscribe to the subreddit:
Community Channel:

0 Comments