Code Review of team 18
|
First off I’d like to compliment the programmers of Team 18 for a thorough file distribution of their header and source files. It’s easy to navigate through the files for a person who sees the code for the first time. Looking at the player class, I noticed that it has over 600 lines of code. Browsing through I noticed that several functions that are related to the player, like the powerups, are included in the player class. To me it seems that player class controls a lot of things that are related to the player, and serves more of a gathering place for code that is related to the player. A lot of key events for the powerups are handled in the player class, which perhaps could be handled elsewhere. My own knowledge as a programmer is to be honest quite limited, so all I say should perhaps be taken with a grain of salt. Perhaps a lot of the functions for powerups and alike, do not need to be called for in the player class, but rather in the gamestate. Spontaneously I think the player class could be very slimmed down. What should a player class handle? To me it should be restricted to movement and sprite animations, but that is my opinion of the matter. I think that the actual code itself is quite well written, but only that some things could be placed elsewhere. If you want to manage the sound delay for shooting, you need to go to player.cpp. Should it maybe be att bullet.cpp instead? Also a separate class for the tutorial could be better, since it takes up a lot of lines in the code. All and all I think it is quite well excecuted, and that you have done well with the overall code. The thing that I would like to point out is the placement of some code. |