From: Erik V. <eri...@xs...> - 2011-07-03 21:54:50
|
Just one little gripe: doesn't MoneyFormatter.money() sound a bit tautological? I once had refactored this very same method into a class Format with a static method money() so that I had Format.money() - that sounds a lot better, at least to me. And not that longish. I had not applied the change to Format.money() because it didn't fix the real problem I have with Bank.format(): it's a static method. That precludes the multi-game server that we have foreseen for a far distant future. I'd rather have an instance method, accessible via our central broker: the GameManager. But we still had (and probably have) too many objects that need be able to format money but don't know about the GameManager, although I think that number is declining - I didn't check it recently. And in this frequently occurring case I'm reluctant to pay the overhead involved with GameManager.getInstance(). Just my thoughts. Erik. > -----Oorspronkelijk bericht----- > Van: brett lentz [mailto:bre...@gm...] > Verzonden: zondag 3 juli 2011 22:12 > Aan: Development list for Rails: an 18xx game > Onderwerp: [Rails-devel] Refactoring XML Parsing. > > I've just committed the first step in refactoring the XML parsing code. This is > something I started on quite a while ago (~3 years ago, wow.), but didn't > complete for various reasons. Today, I had some time to pick it back up and > work on it again. > > This first commit moves a few classes out of rails.util and into > rails.common.parser. I also make GameInfo a non-static class, create non- > static setters and getters. Finally, I've updated GameSetupWindow to cope > with the new non-static GameInfo. > > This commit also includes a couple of user-visible changes: > > * I've updated the Credits section in GamesList.xml to include a more > complete list of the people who've contributed code, art assets, or > documentation. > * I've made the user list always select "human" for the minimum number of > players. This should save everyone a couple mouse clicks when starting a > game. > > ---Brett. > > ---------------------------------------------------------------------------- -- > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |