Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feedback-second-version #16

Open
leithatia opened this issue Feb 15, 2024 · 0 comments
Open

feedback-second-version #16

leithatia opened this issue Feb 15, 2024 · 0 comments

Comments

@leithatia
Copy link
Collaborator

Well done with developing this game. It's cool to see the new features and how you've refactored your code following up from your previous feedback.

The addition of sound is nice and I particularly like the new 'wings' power up. It's details like this that enhance a game and make it stand out. The player collision is also a great idea although it would be nice with some kind of shake animation perhaps as currently the players just stop which doesn't provide much to the player in terms of feedback (they might wonder if this supposed to happen or is it a glitch in the game).

Also nice to see that you decoupled code, splitting responsibilities into different classes. You followed the advice of reducing duplicated code in the Player classes thereby taking advantage of inheritance. However, there is still some room for improvement in the AiPlayer class regarding repeated code. Whenever you see repeated code, always think to keep it DRY (Don't Repeat Yourself).

I'm also seeing a fair bit of dead code lying around i.e. commented out code, methods that aren't used etc. It's always a good idea to remove that code. If you want to keep it for future reference, you can create a separate branch for that but when submitting code for review it's best to omit it.

Another tip, in the Menu class, when you end up having so many related fields it's always a good idea to ask yourself how to reduce the amount code and if it's really needed. Here, for example, you could consider using a collection such as a list or array. If you wanted to be able to access elements by their names then a HashMap would be useful. This requires a little more work to set up but the benefits are that the code is not only easier to read, but it is easier to maintain in the long run and easier to debug should you have any issues. But generally, your code is neatly laid out and I appreciate your efforts there as reviewing messy, poorly indented code is never much fun! :D

All in all, really good work here and I hope this is the first of many games to come! Keep up the good work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant