From: Erik V. <eri...@hc...> - 2005-04-30 20:59:47
|
I have checked in the initial versions of Round and StockRound. To support these, some methods have been added to other classes too. The only thing I have checked is that all this compiles. I have not used this new stuff anywhere yet. I will try to do that in the coming days. Brett, I don't recommend to try using this in your code until I have done some real testing. I'm only publishing this stuff now to give you a sense of what I'm doing. Quite untypical for me, most of the javadoc is there, as well as a lot of comments. As discussed before, there are two groups of methods: - a set of methods that processes player actions. The intention is to have all stock round actions be done via this class (I know this duplicates earlier work, but currently think this is the best way to do it). All methods return false if the action is illegal (maybe I should provide error messages, or throw an Exception - suggestions welcome). - a set of methods that tell the UI what the status is, who has the turn, and what shares can be bought or sold, taking into account *all* rules. (That "all" I have not realised yet, of course, but that is the intention. There are a lot of TODO's). For each Stock Round, a new instance must be created (GameManager should do that). Permanent memory (Priority Deal) is through static attributes. So far it looks nice and right to me, but as you know the proof of the pudding is in the eating.... Erik. |