Code Review of Team 4

The first smart thing that got me was the clean start of the player class’ update function. Specifically the way of dividing the different states into their own functions which would be called by the value of an enumerator.
I also like the way that the player class seems to have control of the player dependent objects creation such as the harpoon, the golden harpoon and fish food. This is most likely how I, myself would’ve done it to keep track on what the player class can “access”, but I know many who would like to divide up most of this class into smaller ones. Dividing up the code into separate classes would probably make it more readable if you wanted to (for example) change something specifically related to the harpoon.
What you could’ve done differently, I guess, is have some sort of player manager class which would serve as the glue for each player related component keeping the player class at a minimum of only specific player related data. Even the controls could be in a separate class as well as the states. This would perhaps also prevent people from working on the same files making merging a tad less complicated.
However, to me, this would be an easier solution since my own programming skills are yet a bit limited and your way would give me a better overview of the player and it’s related classes, plus it seems fairly well organized.
Some comments would help making the code easier to get in to, if not for other team members, for an outsider like

Code Review of Team 4

Leave a comment