text-based game, a study of sub-classes and inheritance