From: Erik V. <eri...@xs...> - 2011-11-08 22:57:10
|
> > 2. I understood this code was intended to autopass in start rounds > > only, but nothing in that code restricts its working to start rounds. > > I would expect a condition like ' if (getCurrentRound() instanceof > StartRound) '. > > I was undecided if it should cover also other cases. However in all other > Rounds it is never the case that the sole action is a pass: In StockRounds > there is always the AutoPass action available, in OperatingRounds Pass is > never the sole action too (here Skip or Done is used). So pragmatically there > was no need for an additional restriction and no one ever commented if it > would be nice to extend it to the other cases, so I never followed up. So correct working is dependent on unrelated circumstances accidentally being the case in other round types. > > 3. The code claims to check that there is only a Pass in the possible > > actions, but in fact it only checks that the first action is a Pass. > > In practice that might be equivalent, at least in the current code, > > but it creates a dependency that I would rather avoid. What you really > mean is: > > there is a pass and there isn't a bid or buy, i.e. no StartItemAction. > > Why not implement it that way? > > Please refer to the implementation inside PossibleAction.containsOnlyPass(): > > The code checks two conditions: > a) There is only one action and b) this action is a pass. > If both conditions are true the pass action is selected automatically. And it works as long as this check is done before adding correction and undo/redo actions. Well, if you feel happy with such dependencies, what can I say? I'm not. Erik. |