From: Brett L. <wak...@ea...> - 2005-03-05 02:36:17
|
*********** REPLY SEPARATOR *********** On 3/4/2005 at 9:33 PM Erik Vos using eri...@hc... declared: >> Being able to craft some quick test cases for moving the >> marker around and checking the results via console >> is the first end-goal for the stockmarket class. > >The StockChart moveXxxx() methods already write the moves to System.out, >if that is what you want. >(I guess this will later be replaced by writing to a log). > The reason I suggest using toString() is that this will allow us to use it= for many other things beyond simply testing the classes. For example, it's an easy way for us to gather reporting data about the= state of the game by using each objects toString() method rather than= polling every getFoo() method for every property within the object. >> >1. In theory we might be able to make one StockMarket class that can >> >handle all varieties (linear, rectangular and hexagonal) >> >but I think we can better split up into generic and special classes. >> >> As was mentioned before, linear is just rectangular with a >> single row. No special class needed there. > >I noticed that. The question still is (not just here but in general): >how many different variants are we prepared to cram in one class? >Maybe I have a tendency to subclass (too) early and (too) often... > Well, it's something to take on a case-by-case basis. The big point is that in the case of linear markets, there's no need to do= the extra work of creating a whole new subclass because the normal= rectangular market will already work as a linear market without any= modifications. This project is going to be complex enough, so anywhere that we can find= these sorts of simplifications of structure, we should take advantage of= them. >> >Hexagonal is rare (I believe 1837 only) so it's special anyway. >> >We might also consider linear stockmarkets special, because >> >so few games have it (AFAIK only the Tresham games and 1860). >> >> I wouldn't focus too much on getting a hexagonal stockmarket >> working just yet. So long as the generic class is >> capable of allowing implementation of these later, that's fine. > >Sure, 1837 is a *very* long term goal (frankly I'm not convinced >that we get even 1830 out of the door, but that does not depress me. >It's a hobby!). > I think that if we can set realistic milestones for ourselves, we'll get it= done. Right now, I'd just like to see a working stockmarket. Once that works, we= can look at getting a working game map put together. After that, we'll aim= for a working auction for private companies. And so on, and so on, until= we've got a fully working game. We will get there. The important thing is to not let the large scope of the= project take away from being able to achieve each of the smaller goals= that, when combined, will allow us to achieve the larger project goals.= :-) ---Brett. |