From: Erik V. <eri...@xs...> - 2010-07-23 20:21:55
|
OK, I have bitten the bullet and changed BuyCertificate to use company name and share size in stead of certificate ID, while maintaining backwards compatibility. I have tested against various late-game test cases of all major playable games, and it seems all right now. It would be good if anyone able to run from the latest code could run their own cases against it. I did not do much checking of Undo/Redo, except for the specific 1889 case that started it all. Undo is still known to be imperfect in some cases, and can better be avoided; it's always safer to restart from a saved game. Erik. -----Original Message----- From: Erik Vos [mailto:eri...@xs...] Sent: Sunday 18 July 2010 22:39 To: 'Development list for Rails: an 18xx game' Subject: Re: [Rails-devel] 1856 bugs in Rails 1.3 -- undo duringCGRformationhangs game Yes, I agree that finding the seller is the catch. MoveableHolder requires all portfolios (potential sellers) to have a name, so perhaps what we need is a Map to link names to portfolios. Thinking about it: identifying the seller and the share type bought is only role currently fulfilled by passing the cert (ID), because after extracting that info the cert ID itself is ignored. So why not pass seller name and share type explicitly? Detecting the wrong seller is exactly the problem we face. One other issue then is to make the old and new version of BuyCertificate compatible for deserialization, because I would hate to invalidate all my test cases. But that should be doable. Erik. |