16 using CreateFunc = std::function<
Game*()>;
23 void registerClass(CreateFunc createFunc) {
24 this->creatorFunc = createFunc;
28 if (this->creatorFunc ==
nullptr) {
29 throw std::runtime_error(
"No game implementation registered!");
32 Game* game = (this->creatorFunc)();
33 game->gameInternal = gameInternal;
38 CreateFunc creatorFunc =
nullptr;