From: Stefan F. <ste...@we...> - 2012-07-27 05:05:25
|
All, Another part of the Rails2.0 series, introducing the most important part of the state package, the Portfolio class(es). This is a pretty long text, but it should serve as documentation for future usage. As usual I will state the goal of the design first, followed by more details about the implementation. Critical comments most welcome. Stefan A) The idea behind Portfolio The main problem of the previous undo-mechanism was the ownership of the "Moveable" items: This was not (fully) automated and the side-effects had to be taken care manually. The "Moveable" interface of Rails1.x is renamed to "Ownable" in Rails2.0, but both indicate items that can change their owner during the game (e.g. certificates, trains etc.). In Rails2.0 all ownable Items have to be stored in a "Portfolio" which itself is a subclass of State (thus it has built-in undo/redo and observable mechanisms). A portfolio is a generic collection, thus has a type which indicates what can be stored: e.g. Portfolio<Train>. Each portfolio has an "Owner", which is another interface of the state package to be implemented by those classes that can own items (Rails 1.x: MoveableHolder). Moving an item from one portfolio to the other is very simple: One calls the method item.moveTo(Owner newOwner) and behind the scenes the following happens: A) The item is added to the portfolio of the newOwner B) The item is removed from the portfolio of the oldOwner C) The owner of the item changes from the oldOwner to the newOwner This is similar to what (most of the time) happened in Rails1.x, however there is no manual coding involved anymore in Rails2.0 B) More details for the usage of Portfolio In fact there are two subclasses of Portfolio, which itself is an abstract class: PortfolioSet and PortfolioMap *** How to create Portfolios? It is important to know that each Owner can have only one Portfolio for each Item-Type. However this is the only restriction that exist. Other than that Rails does not care if the Portfolio is created inside the Owner (as a variable there) or somewhere else (e.g. inside a Model). However in the latter case of an indirect holding one has to implement the interface PortfolioHolder and the parent of the PortfolioHolder has to be an Owner. Then item.moveTo(owner) will move the item into the Portfolio of the PortfolioHolder that belongs to the owner. An example: In Rails1.x most items where stored inside a class called "Portfolio". This still exist however it is called "PortfolioModel" now (as it is a subclass of Model). PortfolioModel itself implements PortfolioHolder, thus it is able to hold Portfolios instead of the (true) owner. public class Player() implements Owner { private final PortfolioModel portfolios = PortolioModel.create(this, "Portfolios"); } public class PortfolioModel() implements PortfolioHolder { private final Portfolio<Train> trains = PortfolioSet.create(this, "Trains"); } If one wants to move the train to a new player, train.moveTo(newPlayer) is sufficient. Remark: In the example above the item hierachy automatically allows to locate the portfolio with root.locate("/Companies/PRR/Portfolios/Trains") returns the train portfolio of the company PRR. *** How to create an Ownable Class? Important rule first: Better do not implement the Ownable Interface, but extend from the OwnableItem abstract class (unless you really no what you do and it is really necessary to no extend the abstract class). The major restriction is that an Ownable type can only be stored in one specific typed portfolio. Take an example again: PublicCertificate is a subclass/implementation of Certificate. So in principle it is possible to store PublicCertificate(s) either in Portfolio<Certificate> or Portfolio<PublicCertificate>. To allows Rails identify the correct portfolio to use (and for some other technical reasons with respect to Java Generics) it is required to specify which ones should be used (both variants are possible). Which is used depends which class extends from the OwnableItem: If Certificate extends OwnableItem<Certicate> all certificate(s) and all objects of its subclasses can only be stored inside portfolios of the type Portfolio<Certificate>. If PublicCerticate extends OwnableItem<PublicCerticate>, all public certificates are stored inside portfolio of the type Portfolio<PublicCertificate>. However this implies that Certificate can only be an Interface, as Java one allows extending one class (a case where the concept of Mixins would help). Other than that it is easy. Assume we decide that PublicCerticate is the correct level to extend OwnableItem. Except extending one only has to call the super-constructor. public class PublicCertificate extends OwnableItem<PublicCertificate> { public PublicCertificate(Owner parent, String id) { super(parent, id, PublicCertificate.class) } } The constructor of OwnableItem requires the class of the derived class as an argument to be able to locate the correct portfolio. *** PortfolioSet or PortfolioMap? The default implementation of Portfolio is a PortfolioSet: Here all items are thrown into one bucket, each ownable item is unique (has its own id), thus it is implemented as a set. General Remark: If items are not-unique, there are other structures to deal with those (non-unique items implement Countable and get stored in a Wallet). A more sophisticated variant is PortfolioMap. Here the portfolio is structured by a "type" attribute of the items. An example is the storage of PublicCertificate(s). All certificates for all companies get stored in one PortfolioMap (per owner). This allows to call portfolio.get(company) to retrieve only those certificates of the specified company. To be able to retrieve all certficates for one company only, the PortfolioMap keeps track of the type. Requirement is that the item implements the "Typable" interface. An example makes things clear: This definition of PublicCerticate: public class PublicCertificate extends OwnableItem<PublicCertificate> implements Typable<PublicCompany> { PublicCompany getType(); } allows to store those inside PortfolioMap<PublicCompany, PublicCertificate> portfolio = PortfolioMap.create(this, "Shares"); Moving a share into the map still requires only: share.moveTo(newOwner). The portfolio knows automatically where to put the share according to its method getType(). Further Remark: PortfolioSet and PortfolioMap work interchangeable, thus even in the case above it is still possible to store PublicCertificates inside a PortfolioSet<PublicCertificate>. Think the example of a company which is able to buy-back its own share, here a PortfolioSet is fully sufficient and can be used in parallel to the PortfolioMap(s) of the players. C) Are the restrictions above severe? *** Only one portfolio of each type per owner? Seems pretty bad at the beginning, but there are easy workarounds. * Example: Bank has several portfolios (ipo, pool, unavailable, scrapheap). Solution: Add a new structure BankPortfolio which implements Owner itself. Inside Bank create BankPortfolio ipo = new BankPortfolio.create(this, "ipo"); Then item.moveTo(Bank.ipo) works correctly. * Another example: Used and Unused Tokens of a company One could think that there are two portfolios required (one for used, one for unused). Solution: Make Unused Tokens the portfolio of the company. For usage they get moved to a new owner anyway. To keep track of the used tokens it is still possible to use a HashSetState<Token> in parallel. * A third example: BaseTokens and BonusTokens If both of them have to be stored inside a Portfolio<Token> (because Token extends OwnableItem<Token>, there is no way to separate them. Solutions: a) Add two HashSetState<BaseToken> and HashSetState<BonusToken> in parallel. b) Put the portfolio inside a model and provide .getBonusTokens() and .getBaseTokens() methods. c) Make Tokens implement Typable<Class<? extends Token>> and return the class as type. Then Tokens can be stored inside PortfolioMap<Class<? extends Token>, Token> and portfolio.get(BaseToken.class) and portfolio.get(BonusToken.class) works. D) Implementation Details The implementation is (surprisingly even to me) short. The main class is the PortfolioManager, which is accessible from the StateManager: Internally it stores references to all portfolios created using a (type, owner) tuple as key inside a HashMapState. The OwnableItem itself only has one GenericState<Owner> variable, which tracks the current owner. If item.moveTo(newOwner) is called, PortfolioManager returns both the portfolio of the new and the current owner. This allows to create a PortfolioChange with that information, which is added to the ChangeStack. That's it. |
From: Erik V. <eri...@xs...> - 2012-07-27 12:30:23
|
Stefan, All details aside, effectively you remove the (old-style) Portfolio holdall objects (except for the Bank, where four of such containers are really needed, and now are renamed to BankPortfolio). That removes a level of indirection in many calls, so it sounds like a real improvement. A few more notes: > The default implementation of Portfolio is a PortfolioSet: Here all items are > thrown into one bucket, each ownable item is unique (has its own id), thus it > is implemented as a set. > > General Remark: If items are not-unique, there are other structures to deal > with those (non-unique items implement Countable and get stored in a > Wallet). > > A more sophisticated variant is PortfolioMap. Here the portfolio is structured > by a "type" attribute of the items. I notice that you are omitting PortfolioList. Please be aware, that in some cases sequence matters. For instance, IIRC, the President's certificate is occasionally retrieved via .get(0). Of course, there are ways around that. > * A third example: BaseTokens and BonusTokens > > If both of them have to be stored inside a Portfolio<Token> (because Token > extends OwnableItem<Token>, there is no way to separate them. > > Solutions: > a) Add two HashSetState<BaseToken> and HashSetState<BonusToken> in > parallel. > > b) Put the portfolio inside a model and provide .getBonusTokens() and > .getBaseTokens() methods. > > c) Make Tokens implement Typable<Class<? extends Token>> and return > the class as type. > Then Tokens can be stored inside PortfolioMap<Class<? extends Token>, > Token> and portfolio.get(BaseToken.class) and > portfolio.get(BonusToken.class) works. I wonder why you omit d) Create two portfolios Portfolio<BaseToken> and Portfolio<BonusToken>. Is that because in some games BaseTokens can change into BonusTokens? (Example: 18FL). Erik |
From: Stefan F. <ste...@we...> - 2012-07-27 13:37:45
|
Erik, thanks for your comments. See my quick replies below. Stefan On 07/27/2012 02:30 PM, Erik Vos wrote: > Stefan, > > All details aside, effectively you remove the (old-style) Portfolio holdall > objects (except for the Bank, where four of such containers are really > needed, and now are renamed to BankPortfolio). That removes a level of > indirection in many calls, so it sounds like a real improvement. All details aside, the Euro is just another European currency ;-) Jokes aside, in fact (the old-style) Portfolio survived as PortfolioModel in Rails2.0 (in rails.game.model), which is the prime example of a PortfolioHolder. So currently there is still a level of redirection involved. More precisely the Portfolio classes are specialized replacements for the general ArrayListState used before. This removes the need for a lot of manual code which was missing in ArrayListState for this special situation. > I notice that you are omitting PortfolioList. Please be aware, that in some > cases sequence matters. > For instance, IIRC, the President's certificate is occasionally retrieved > via .get(0). Of course, there are ways around that. > Only a few days ago I decided to drop PortfolioList: I already prefer to use Sets if items can only appear once inside the collection (as Java has no UniqueList included). However given the more complicated handling of undo/redo for lists, was the decisive argument here. I am aware of the casual use of the first share as the PresidentShare. I regard this as a hack, which I would like to fix in the next few days. > > I wonder why you omit d) Create two portfolios Portfolio<BaseToken> and > Portfolio<BonusToken>. > Is that because in some games BaseTokens can change into BonusTokens? > (Example: 18FL). > Good comment: I forgot to mention that I forgot to mention that I assume that the Token class extends OwnableItem<Token>. In this case it is only possible to store BaseToken and BonusToken inside Portfolio<Token> and one cannot use specialized Portfolios. So a full detailed d) would be: d) Make Token an Interface and have both BaseToken and BonusToken extend OwnableItem themselves. However then it is not possible to use Portfolio<Token> as a joint storage. |
From: Stefan F. <ste...@we...> - 2012-09-02 07:03:28
|
*** Further updates on Portfolios: Considering Erik's feedback and some further considerations I have done the following changes to Portfolios / Ownable Items: A) Ownable extends Comparable: This implies that all ownable items have to define an ordering. By default (in abstract OwnableItem) the ordering is based on their (unique) ids. B) PortfolioSet is a SortedSet Using the required ordering of ownable items, the portfolios are sorted accordingly. (Accordingly PortfolioMap is a SortedMultimap). Major advantage is that the ordering is always specified, and there is no ambiguity which certificate is returned, even if one asks only for a specified type. *** Examples for orderings: * PublicCertificates are sorted by i) President or not ii) CertificateType (and those are sorted by number of shares inside) iii) CertificateId This keeps the PresidentShare at position zero of each portfolio without requiring any code to keep it there. And it keeps the multi-shares at the top of a list of certificates. * Trains are sorted by i) TrainType ii) TrainId This makes it easy to generate the list of trains, as they are already sorted as required. |
From: Erik V. <eri...@xs...> - 2012-09-02 10:41:43
|
Stefan, > * PublicCertificates are sorted by > i) President or not > ii) CertificateType (and those are sorted by number of shares inside) > iii) CertificateId > > This keeps the PresidentShare at position zero of each portfolio without > requiring any code to keep it there. And it keeps the multi-shares at the top > of a list of certificates. How will you then handle the 1835 double shares that must appear at the *bottom* of the IPO stack (BA, WT and HE)? Currently, specification order determines IPO order. Erik. |
From: Stefan F. <ste...@we...> - 2012-09-02 14:03:39
|
Erik: the underlying TreeSet allows to optionally specify a Comparator which deviates from the natural ordering. Thus it is easy to add a different ordering to the IPO portfolio. But thanks for reminding me of that, do you know other cases where the ordering of a "portfolio" in Rails 1.x is important for game mechanics? Stefan On 09/02/2012 12:41 PM, Erik Vos wrote: > Stefan, > >> * PublicCertificates are sorted by >> i) President or not >> ii) CertificateType (and those are sorted by number of shares inside) >> iii) CertificateId >> >> This keeps the PresidentShare at position zero of each portfolio without >> requiring any code to keep it there. And it keeps the multi-shares at the > top >> of a list of certificates. > > How will you then handle the 1835 double shares that must appear at the > *bottom* of the IPO stack (BA, WT and HE)? > Currently, specification order determines IPO order. > > Erik. > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: Erik V. <eri...@xs...> - 2012-09-02 20:52:52
|
I would say: the natural ordering is the order in which shares are initially sold. I would strongly advise against meddling with that order. For that reason, I'm not at all convinced that a Set is better than an Array to hold the company certificates. Having to create a special Comparator to restore the initial order (how to configure that?) sounds like doing it backwards to me (we Dutch call that "putting the horses behind the carriage"). In special cases like the Prussian, or the SJ in 18Scan, where non-president shares can be bought before the company floats, there is no reaI need to have the President certificate on top, although I would still consider that 'natural'. These cases need special code anyway. Also keep in mind conversions from 5-share into 10-share companies, and other variations on that theme. Erik. > -----Original Message----- > From: Stefan Frey [mailto:ste...@we...] > Sent: Sunday, September 02, 2012 4:04 PM > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] Rails2.0: Portfolios, Ownable and Owner > > Erik: > the underlying TreeSet allows to optionally specify a Comparator which > deviates from the natural ordering. > > Thus it is easy to add a different ordering to the IPO portfolio. > > But thanks for reminding me of that, do you know other cases where the > ordering of a "portfolio" in Rails 1.x is important for game mechanics? > > Stefan > > On 09/02/2012 12:41 PM, Erik Vos wrote: > > Stefan, > > > >> * PublicCertificates are sorted by > >> i) President or not > >> ii) CertificateType (and those are sorted by number of shares inside) > >> iii) CertificateId > >> > >> This keeps the PresidentShare at position zero of each portfolio > >> without requiring any code to keep it there. And it keeps the > >> multi-shares at the > > top > >> of a list of certificates. > > > > How will you then handle the 1835 double shares that must appear at > > the > > *bottom* of the IPO stack (BA, WT and HE)? > > Currently, specification order determines IPO order. > > > > Erik. > > > > > > ---------------------------------------------------------------------- > > -------- > > Live Security Virtual Conference > > Exclusive live event will cover all the ways today's security and > > threat landscape has changed and how IT managers can respond. > > Discussions will include endpoint security, mobile security and the > > latest in malware threats. > > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > ---------------------------------------------------------------------------- -- > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and threat > landscape has changed and how IT managers can respond. Discussions will > include endpoint security, mobile security and the latest in malware threats. > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Stefan F. <ste...@we...> - 2012-09-02 21:55:04
|
The Comparator would be based on the already available indexInCompany variable in Rails1.x (which is identical to the id in Rails2.0). So you provide create a Comparator and pass that to the constructor of the IPO portfolio. So the IPO portfolio will be sorted by the purchase order, whereas the Player portfolios will be sorted by president and certificate type (which I call the natural ordering). You can call this reverted, but your proposal is symmetric: Take the indexInCompany as the default Comparator and create the Player portfolios with the a Comparator based on the order of president and certificate type. As soon as you want support two (or more) different sortings you need one (or more) "non-natural" Comparator(s). I have the strong doubt that I will not convince you, and most likely your reasons against using a Set are as good and valid as mine for not using a List (mainly to avoid undo and testing related problems). However I do not see that much difference between a list with an implicit ordering (initial IPO sequence) of unique elements and a SortedSet, except that you have to ensure the correct order by the code using the portfolio. For the sorted set you have to write code to specify the order, but after that the portfolio guarantees the ordering. Stefan On 09/02/2012 10:52 PM, Erik Vos wrote: > I would say: the natural ordering is the order in which shares are initially > sold. > I would strongly advise against meddling with that order. > For that reason, I'm not at all convinced that a Set is better than an Array > to hold the company certificates. > > Having to create a special Comparator to restore the initial order (how to > configure that?) sounds like doing it backwards to me (we Dutch call that > "putting the horses behind the carriage"). > > In special cases like the Prussian, or the SJ in 18Scan, where non-president > shares can be bought before the company floats, there is no reaI need to > have the President certificate on top, although I would still consider that > 'natural'. These cases need special code anyway. > > Also keep in mind conversions from 5-share into 10-share companies, and > other variations on that theme. > > Erik. > >> -----Original Message----- >> From: Stefan Frey [mailto:ste...@we...] >> Sent: Sunday, September 02, 2012 4:04 PM >> To: Development list for Rails: an 18xx game >> Subject: Re: [Rails-devel] Rails2.0: Portfolios, Ownable and Owner >> >> Erik: >> the underlying TreeSet allows to optionally specify a Comparator which >> deviates from the natural ordering. >> >> Thus it is easy to add a different ordering to the IPO portfolio. >> >> But thanks for reminding me of that, do you know other cases where the >> ordering of a "portfolio" in Rails 1.x is important for game mechanics? >> >> Stefan >> >> On 09/02/2012 12:41 PM, Erik Vos wrote: >>> Stefan, >>> >>>> * PublicCertificates are sorted by >>>> i) President or not >>>> ii) CertificateType (and those are sorted by number of shares inside) >>>> iii) CertificateId >>>> >>>> This keeps the PresidentShare at position zero of each portfolio >>>> without requiring any code to keep it there. And it keeps the >>>> multi-shares at the >>> top >>>> of a list of certificates. >>> >>> How will you then handle the 1835 double shares that must appear at >>> the >>> *bottom* of the IPO stack (BA, WT and HE)? >>> Currently, specification order determines IPO order. >>> >>> Erik. >>> >>> >>> ---------------------------------------------------------------------- >>> -------- >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. >>> Discussions will include endpoint security, mobile security and the >>> latest in malware threats. >>> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Rails-devel mailing list >>> Rai...@li... >>> https://lists.sourceforge.net/lists/listinfo/rails-devel >>> >> >> >> > ---------------------------------------------------------------------------- > -- >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and threat >> landscape has changed and how IT managers can respond. Discussions will >> include endpoint security, mobile security and the latest in malware > threats. >> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Rails-devel mailing list >> Rai...@li... >> https://lists.sourceforge.net/lists/listinfo/rails-devel > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: Erik V. <eri...@xs...> - 2012-09-03 15:01:57
|
Stefan, I do not want to have a big argument over these matters, that's not worth it, but I'm trying to understand the reasoning behind your 'natural order', and I cannot find it. > You can call this reverted, but your proposal is symmetric: > Take the indexInCompany as the default Comparator and create the Player > portfolios with the a Comparator based on the order of president and > certificate type. > > As soon as you want support two (or more) different sortings you need one > (or more) "non-natural" Comparator(s). But what is then the use case of your 'natural order'? Let's look at the most obvious use cases: 1. Initial purchase from IPO. Fixed order, as configured. This usage calls for a List. 2. Purchase from Pool or Treasury. In most cases, just one share can be bought, so all you need is a single (any) share per share size. Any ordering can handle this, though a Map per share type (size) would help, or a Set per share type. Is that what you do? Current code just iterates over all shares, and any iterable collection type can handle this equally well, though a List looks most efficient. Order doesn't matter at all. 3. Finding which and how many shares can be sold. Here you need counts of each share type (size). Basically what I said for use case 2 applies here too. 4. Add up share worth. Again, any iterable collection can handle this. Nowhere I can find any reason to have such a thing as your 'natural order'. So I'm curious what use case you think would benefit from such an order. I must be missing some point... (Of course it's possible that you have explained it in the past perfectly well, and then I apologize for having forgotten it). Erik. |
From: Stefan F. <ste...@we...> - 2012-09-03 20:07:32
|
Erik, answers see below: On 09/03/2012 05:01 PM, Erik Vos wrote: > Stefan, > > I do not want to have a big argument over these matters, that's not worth > it, but I'm trying to understand the reasoning behind your 'natural order', > and I cannot find it. > >> You can call this reverted, but your proposal is symmetric: >> Take the indexInCompany as the default Comparator and create the Player >> portfolios with the a Comparator based on the order of president and >> certificate type. >> >> As soon as you want support two (or more) different sortings you need one >> (or more) "non-natural" Comparator(s). > > But what is then the use case of your 'natural order'? Sorry mentioned it at the beginning of the discussion, but maybe did not stress enough, that it is an arbitrary choice. It is the one used for display in the UI: For certificates it is the (default) sorting for the detailed certificate list in the UI. So the "advantage" of a sorted set (collection) is that you do not have to sort again anytime you update the UI. The wording "natural order" only refers to the fact that I define it as the order for the Comparable interface: So any sort without an explicit Comparator given will use that order. > > Let's look at the most obvious use cases: > > 1. Initial purchase from IPO. Fixed order, as configured. This usage calls > for a List. I totally agree that the IPO is sorted differently than other Portfolio (both for display and usage). But you won't disagree, that the IPO is sorted. > > 2. Purchase from Pool or Treasury. In most cases, just one share can be > bought, so all you need is a single (any) share per share size. Any ordering > can handle this, though a Map per share type (size) would help, or a Set per > share type. Is that what you do? Current code just iterates over all shares, > and any iterable collection type can handle this equally well, though a List > looks most efficient. Order doesn't matter at all. Certificates are stored in a PortfolioMap, however the keys are PublicCompanies and not CertificateTypes. Main reason is that Portfolio only allows one Portfolio per Type and PortfolioMap only allows one level of typing (we would need a Map of Map). So it would be possible to create a Portfolio that separates by CertificateTypes, but then we would have to filter by company. > > 3. Finding which and how many shares can be sold. Here you need counts of > each share type (size). Basically what I said for use case 2 applies here > too. > > 4. Add up share worth. Again, any iterable collection can handle this. > > Nowhere I can find any reason to have such a thing as your 'natural order'. > So I'm curious what use case you think would benefit from such an order. I > must be missing some point... > (Of course it's possible that you have explained it in the past perfectly > well, and then I apologize for having forgotten it). > Again: You are right those use cases give no reason for different orderings, except for the fact that I believe the ordering of the IPO and the ordering to display the shares in the UI can be different. Could it be that you do not mind the ordering as such, but that you still dislike the choice of a set instead of a list? And you are right that if coded correctly a list works as well as a (sorted)set and is more efficient, but I prefer the built-in protection of the set against coding errors that create undo problems that are difficult to track. Stefan |
From: Schnell, V. <vol...@ar...> - 2013-06-03 17:41:28
|
Hi, two problems. HB is offered to a person, who has no Priority Deal. In the first Share Round the HB was not sold. in the third Share Round the HB is offered to Jupp instead of Sven, who has the Priority Deal. (file: ...hb.rails) After the HB was bought, it is not possible to sell the Bay shares. Rules: 7.1 no shares may be sold during the first share round. This rule is not true, because it's the third share round. The Bay has also operated two times. (See also First Share Round: Should certificates from the Startpaket fail to sell in the first Share round, then they must first be sold in subsequent Share rounds before other shares are available) (file ..bay.rails) Greetings Volker -- Volker Schnell email: vol...@ar... homepage: home.arcor.de\volker_schnell |