This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<Strategy> | |
class Algorithm { | |
friend class ConcreteStrategy; | |
public: | |
Algorithm(ConcreteStrategy strategy) : strategy{strategy} { | |
strategy.set_algorithm(this); | |
} | |
void onEvent(Event x) { | |
this->strategy.onEvent(x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Random-Number Utilities (randutil) | |
* Addresses common issues with C++11 random number generation. | |
* Makes good seeding easier, and makes using RNGs easy while retaining | |
* all the power. | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 Melissa E. O'Neill | |
* |