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-first-version #2

Open
margaridacavadas opened this issue Feb 2, 2024 · 0 comments
Open

feedback-first-version #2

margaridacavadas opened this issue Feb 2, 2024 · 0 comments

Comments

@margaridacavadas
Copy link
Collaborator

In general, your game is nice and fun. You managed to create a cool game with great potential for growth, and with an implementation that remained clean, which will help with new additions, and modifications. It's hard to write a program thinking about what will happen in the future, but it's important to keep all the ideas you have in mind, and try to write the game from the beginning that is adaptable - you can do that with the use of Inheritance (try to program with superclasses/interfaces instead of the subclass - take a look at the polymorphism materials), and by organizing your code, thinking when and where you are instantiating the objects and organizing your project structure.

Looking in particular to your Game class I would advise you to pay special attention to the access modifiers: having the class properties as private is a good practice, so you can restrict the access and their modification. The same logic applies to methods that are only used inside their own class (the only two methods you invoke outside of this class are start() and setCar(), so all the other methods - excluding the setters - can be set to private). It's a good way to make sure your code remains readable and becomes more secure.

It would be nice to have a few things to improve user experience, like an initial page with instructions; a button to quit the game.

If you plan, in the future to add more types of obstacles/enemies, or even different elements, like clients, you should start thinking on how to make your code more scalable (that is, more prepared to grow and adapt to the changes without having to rewrite everything): consider the use of superclasses or interfaces, and the application of a few design patterns (the ones I would suggest for your program would be the Factory DP and the Strategy DP). Organizing your classes in directories should also help.

Can't wait to see the changes that you'll implement and to play again! Keep up the good work!

Tariknunes14 added a commit that referenced this issue Mar 4, 2024
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