Re: Design Question
Martin Gregorie <martin@address-in-sig.invalid> writes:
I'd normally take a somewhat different approach: since this game is all
about the user interacting with a graphical front end, I'd design the GUI
first and think about the class structure only when happy with that.
One also can start with a ?monolithic? program that has no
proper modular class structure and then obtain a class
structure according to today's recommendations by a sequence
of refactorings.
IMO the design of the GUI is extremely important and deserves a lot of
care because,
However, you do not necessarily need to get it right right
from the start. Instead you can write the GUI code to be
maintainable and then improve the GUI according to your own
observations and user feedback.
if its poor as many GUI designs are, the application will
suffer because people are going to be less enthusiastic about using it
regardless of how good the design and code behind it may be.
Also, tastes do differ. I prefer an unobtrusive design with
most commands in the program menu and all the program
operable using the keyboard only. It seems today many
designers (and users?) have other preferences.
I'd consider using a JOptionPane dialog that only gets shown at the end
of the game when it pops up to display 'Exit' and 'Another game' buttons
so the user can decide whether to exit or start another game. Needless to
say, it needs to be positioned so it doesn't hide the final score.
In this case, I'd prefer the program to just wait (without
opening a dialog). The user than is free to issue commands,
including ?exit? or ?another game?, from the program menu.