Skip to content

Instantly share code, notes, and snippets.

@branislav1991
Created June 15, 2022 17:23
Show Gist options
  • Save branislav1991/b4f3b54eedab62e98521f17ebe32de55 to your computer and use it in GitHub Desktop.
Save branislav1991/b4f3b54eedab62e98521f17ebe32de55 to your computer and use it in GitHub Desktop.
class Player
{
public:
Player() {}
template <typename InteractiveObject>
void interactWith(InteractiveObject *obj)
{
if (obj)
{
obj->interact();
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment