Skip to content

Strategy pattern

at-grigorievich edited this page Feb 3, 2022 · 3 revisions

Strategy - behavioral design pattern.

It defines a family of similar algorithms and places each of them in it's own class (encapsulates), after which can be interchanged right at runtime.


Example:

Press SPACE key to change movement logic

CODE

Clone this wiki locally