From: Brett <wak...@ea...> - 2005-04-27 00:34:22
|
On Wed, 2005-04-27 at 00:38 +0200, Erik Vos wrote: > > Though, now that I think about it, perhaps Bank should be a > > totally static > > class? > > It could be, sure. > It's now a singleton, though not very well managed. > It just seems like this is one of the rare instances that I can not envision needing more than one of these. > In hindsight, I think the player list belongs in Game > (not in Player or in GameLoader), > so that all possible UIs can get it from there. > What about that? > > We should be careful to keep game data and UI stuff separate, > so that in the future our classes can also be used for > a 18xx game server (just to name one possibility). > So the player list should not be saved in the UI code. > I was seeing the same thing myself. Probably most or all of GameLoader can be moved into Game. > > On Game: I was thinking that we could rework Game into a singleton > class just like CompanyManager and StockMarket, and also > created by ComponentManager, in which certain game-wide > properties could be initialised from XML that would not > fit easily elsewhere. E.g. the definitions regarding "rounds", > the size of the Bank etc. > > But the players will have to come from the UI - any UI! > > And maybe Game and GameLoader should swap names. > Yes, yes, and probably yes. > > Things are starting to look a lot like an actual game. It's > > quite encouraging. > > If you can fix that missing-method compiler error in Options, > it might for me too..... > That is a really bizarre error. The setPreferredSize method ought to be inherited from JComponent. http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComponent.html#setPreferredSize(java.awt.Dimension) Unless "import java.awt.*" is missing from the file, I can only think that you've got a bad copy of the file. I just did a clean checkout of the whole project, and it compiles and runs just fine for me. ---Brett. Barbie says, Take quaaludes in gin and go to a disco right away! But Ken says, WOO-WOO!! No credit at "Mr. Liquor"!! |