From: Erik V. <eri...@xs...> - 2011-10-04 17:50:29
|
Bill, your fix did the job, but in a way that is not so easy to understand - at least, it took me a while. The underlying problem is, that one (the just bought) share was unconditionally subtracted *after* the check was done if there is enough space in the Pool. Buying from the Pool creates space for two shares, buying from IPO leaves one space. In the latter case, no further deduction should have happened. I have now reversed the sequence of these two checks, and all is fine. Your fix essentially did the same thing, but now *I* can understand the code...:) The test set also succeeds, apart from the usual KKÖB Unicode mismatch in 18EU. Erik. > -----Original Message----- > From: Bill Rosgen [mailto:ro...@gm...] > Sent: Tuesday, October 04, 2011 11:32 AM > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] Bug in 1856 > > Since I already have a fix sitting in a dev-branch, here is an Eclipse patch to fix > the current problem. If you'd rather fix it in some other way, please feel free > :) > > The result is that if you buy a share in a company in a stock turn, then at the > end of the stock turn you must hold at least one share of that company. This > changes the way Rails behaves regarding presidencies. It is now legal to start > the turn with only the presidency of a company and buy and sell a single > share. > > I agree that this is the most reasonable interpretation, and it seems to > correspond to the intent of the designer, but I wanted to be explicit that a > change in behaviour is being made, even if no change in intent is present. > > Bill |