From: Erik V. <eri...@xs...> - 2011-11-21 14:43:16
|
> > From: Stefan Frey [mailto:ste...@we...] > > B) Player T3 sells 30% of WT: There is no selection to chosse either > > one 20% or two 10% certificates for exchange of the president certificate. > > Not sure if this was an accidental or a deliberate oversight, but in any case > the current share selling process was not prepared at all to allow such a > choice. > It's now overhauled to allow a selection of exchange certificates in case of a > dump. In all dump cases (in all games) the exchange certs are now > mentioned as well. Where a choice is possible, the selling choice list has > separate options to cover the different exchange certs. It turned out that this was not the whole story. The above-mentioned fix has disabled dumping half (or even whole) presidencies in some cases. Actually, I found myself seriously entangled in a catch-22 situation with respect to the old question: do we sell shares (or better: a share, to be understood as a percentage of ownership), or do we sell certificates? It turns out: we need to do bits of both. Originally, it was all about share(s). 1835 made it necessary to change that to some extent, but selling 20% certificates remained a bolt-on feature. Now Stefan has pointed out some deficiencies with 1835, which forced me to turn around and largely base the selling process on selling certificates. The wording has (on Stefan's request) also been changed that way. But on further testing I found that dumping (selling a presidency) did not always work any longer. The problem is, that if you can dump a presidency, you can sell a share (half the presidency) that is not represented by a certificate. In other words, you sell a certificate that you don't own - that doesn't even exist. I think I have now fixed that as well, but the whole selling process has become pretty kludgey this way. Dumping a presidency is now represented in the sell option list as selling one or two (additional) *single* (i.e. 10% or 5%) certificates. And I'm still not convinced that all possible cases are covered, so I'll remain testing for a while. I intend to add a number of relevant cases to the test set. But the test set cannot cover cases where invalid options are wrongly proposed, or chosen, or accepted. --- I think there is a way to improve the situation radically (but that will, without much extra effort, invalidate all existing saved files, including all test cases). The basic idea is that we no longer present a list of sell options to the user, but just a list of certificates that he owns. The UI inserts a checkbox next to each certificate, enabling the user to select the certificates to be sold. The president certificate should then have two (or more) checkboxes to enable whole or partial selling, and to indicate what certificates should be returned if the victim owns both 10% and 20% certificates in 1835. (Possibly I'm not the first to suggest such an approach; if so, let credit be where it is due). So the selection process will be completely handed over to the user, which I think is more user-friendly, and which also simplifies the pre-selection process by the game engine (although 1835 will still require much extra preparation). Perhaps the greatest benefit is, that mixing 10% and 20% certificates is no longer an issue. The UI will have to do some pre-validation according to simple rules: (1) the predefined maximum share that can be sold in total may not be exceeded, (2) the presidency can only be (partly) sold if all other certificates are sold as well. Such a process would radically change the existing information exchange between the UI and the game engine (which will be based upon certificate IDs), and (as said above), old save files become incompatible. So we'll perhaps have to keep this idea for Rails 2.x. Erik. |