We could make the data memebers of combatant private by writing inline functions to access them. Currently they are public because the fight method needs to access both in the same scope.
Log in to post a comment.