Design Patterns Explained - The Strategy Pattern
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: https://github.com/Hopson97/design-patterns-explained/tree/master/strategy
=========
RESOURCES:
More info on strategy pattern:
https://refactoring.guru/design-patterns/strategy
=========
MUSIC USED:
Ken Silverman - PREPSONG - https://www.youtube.com/watch?v=XbSHkB3vF4w
Pokemon DP - Route 209 - https://www.youtube.com/watch?v=bw_iFKE5QBE
Banjo Kazooie - Main Title - https://www.youtube.com/watch?v=dQNAVqW1shA
Banjo Kazooie - Pause Screen - https://www.youtube.com/watch?v=BWzc_jgpIzg
Orchard Media - Square Hill (Spyro) - https://www.youtube.com/watch?v=vKYia8vKp2Q
Tales of Phantasia - The Final Act - https://www.youtube.com/watch?v=4Ja7PJUkvyk
Ken Silverman - DRIFSNG22 - https://www.youtube.com/watch?v=x2qAjf4sGZE
=========================================
LINKS:
GitHub:
https://github.com/Hopson97
Discord Server:
https://discord.gg/detzYXTXAm
Support me on Patreon:
https://www.patreon.com/Hopson
Follow me on Twitter:
https://twitter.com/Hopson1997
Follow me on Twitch:
https://www.twitch.tv/hopsonn
Subscribe to the subreddit:
https://www.reddit.com/r/HopsonCommunity/
Community Channel:
https://www.youtube.com/channel/UCvP6PNyj42j9PHPmCpo7Srg
Science & Technology
#Unity
#Unreal
#Engine
#MineCraft
#How
#To
#Tutorial
#C++
#SFML
#Programming
#Game
#Dev
#Sky
#does
#minecraft
#pewdiepie
#Multithreaded
#tut
#how
#to
#make
#games
#android
#ios
#apple
#lwjgl
#java
#C#
#rust
#language
#do
#learn
#program
#game
#for