/strategy

Example code for the Strategy design pattern.

Primary LanguageC++MIT LicenseMIT

Strategy Design Pattern

This is a simple sketch of a Strategy design pattern with smart pointer. The idea is to have a simple implementation handy to apply in any application.

As reference, the following resource was used.

https://refactoring.guru/design-patterns/strategy/cpp/example#lang-features

Feel free to use it in your project.

Building

To build the project in a Linux distribution, follow the bellow steps.

$ mkdir build && cd build

$ cmake ..

$ make