I have been a Java programmer for the last 6 years, and since the beginning of this year I have been interested in game programming. So, I thought it was a good idea to start with a popular game, and I implemented Ms. Pac-Man in Java. I can say that my implementation looks about 90% similar to the original game, and I tried to use as many design templates and best practices as possible, since it was just a personal project to learn how to code basic 2D games.
Now that I have finished coding, I realized that I have 19 interfaces and a total of 17 classes! So I'm starting to wonder if I can abuse interfaces.
Here is an example of several classes / interfaces that I use:
Class - FullGame (implements FullGameInterface and FullGameObservable)
Class - View1 (implements FullGameObserver)
Interface - FullGameInterface (main function methods: resume, pause, play, etc.)
Interface - FullGameObservable (allows you to view views for update notifications)
Interface - FullGameObserver (implemented by two different types of games for receiving notifications)
Am I using interfaces?
What is your opinion?
source
share