Hi Alexey,

Glad you pointed the thing out. I mentioned in the blog that its a homework for the readers to figure out the way that different instances of player should behave differently. Your approach of achieving that via protocol is the perfect way for the same. I would update my blog with the solution to the above. :)

Coming to the declaration of let team: [Men]! , I think thats fine because making that optional will give any developer an option to have a nil assigned to it, and a cricket team cannot be formed without players.



Software Developer(iOS), Speaker & Writer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store