From: Erik V. <eri...@hc...> - 2005-04-23 14:00:39
|
Although there is still a lot of work to to on the classes developed so far (more features, Javadoc, toString(), save/restore) I can't resist the temptation to look forward to what I think will be the next major step in adding functionality: the rounds. We have three round types: - initial round (buying privates), - stock round, - operation round. (for now leaving aside specialties like the 18EU "Minor Company Final Exchange Round"). For now I suppose that the Stock and Operation rounds can be handled by a single class each (stubs are already available), but the great variety of initial round types may call for a whole range of different classes: - 1830 auction - 1835 standard (each time a limited set available at fixed price) - 1835 Clemens (all available at a fixed price) - 1837 (like 1835 standard, but with price reductions) - 1841 standard (secret bids, revealed simultaneously) - 1825/51 (shuffle and deal) - 18EU (complex auction - IMO the most interesting subgame of them all) and no doubt there are more different varieties. The question I would like to discuss here is, if we can define a common interface to all these classes, so that one common UI can possibly handle all of these. My proposal would be to create an interface (tentatively named Auction) which defines the following method sets: 1. Methods that tell the UI what next moves are possible: - which player has the turn - what privates are available for immediate buying, and at what price, - what privates are available for bidding, and at what minimum price, - whether passing is allowed or not, - which privates are available to select for the next auction (18EU). The UI should call these methods to find how to reconfigure the screen for the next player action. 2. Methods that tell the Auction-implementing class what action the player has performed. This action will then be executed, after which a next set of options is prepared. This way I think we can handle all of the above cases. About the more esoteric ones: - Shuffle and deal: each player is offered only one option, and may not pass. - Secret bidding: players can enter bids in any sequence, when all have passed all the bids are processed and the results made available. Questions: 1. Does this make sense? 2. Did I overlook important initial round mechanisms that should also be considered? 3. Is anybody able to define not-overly-long descriptive class names for all these varieties? If not, I would simply call them AuctionLike1830, AuctionLike1841 etc. Erik. |