Why do you declare functions SetupGame()
, EndGame()
, etc., as public
and not private
?
Is it kind of best practice in C++, for example, for unit testing, etc.?
1 Like
I’m not quite sure why there were honestly. They probably ought to be private as they’re internal functions only meant for the class.
With that said no other class is used with it (or even created) so it’s not a huge deal. Feel free to make them private in your own code.
Ideally unit tests should really only be testing the public interface.
2 Likes
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.