From: Erik V. <eri...@xs...> - 2011-08-14 21:35:18
|
Martin, I have fixed current player highlighting in the StatusWindow. I have not changed the player order (which I understand is what you really want), because that is not so easy to do. I may work on that later. I also will look at the StartRoundWindow later. One aspect I want to think about is if it’s right to sell the privates and the investors in the same StartRound, or that that round can better be split. I’m not sure what you wanted me to do with your patch; I have not put it into the repository (yet). Erik. From: Dr....@t-... [mailto:Dr....@t-...] Sent: Friday, August 12, 2011 9:22 PM To: Development list for Rails: an 18xx game; Erik Vos Subject: Re: [Rails-devel] GameManager and players array problem (Java implementation of reordering players) Hi Erik, et al. heres the patch coming up :) The "bug", rather the problem with StatusWindow and StartRoundWindow can be repeated as following: Generate a Game, bid for the Privates like usual and after the last private has found its owner, the code internally reorders the player order. That is yet not reflected on the StartRoundWindow it simply sets the operational marker to the Player in the first Slot but of course doesnt update the Caption nor the Tableau on StartRoundWindow. If you then proceed to buy an Investor that investor gets credited to the correct Player in StatusWindow. So assume Player A B C D, then Player A (always) will have the first Choice of the Investor even though internally it might be Player D( as he has spent the most money in Privates). Player A gets shown selects an Investor and that is credited to Player D. But here comes the problem, looking during the execution of the Program into the variables at a breakpoint of UpdateStatus in StartRoundWindow i couldnt find the changed players array in there, just the original players array with order [A,B,C,D] while it should have been [D,B,A,C] for example, based on the cash spent in StartRound.... Dont hesitate to contact me, if anything is still unclear :) Regards, Martin -----Original-Nachricht----- Subject: Re: [Rails-devel] GameManager and players array problem (Java implementation of reordering players) Date: Fri, 12 Aug 2011 15:49:48 +0200 From: "Erik Vos" <eri...@xs...> To: "'Development list for Rails: an 18xx game'" <rai...@li...> Hi Martin, It is one thing that the UI player order does not change; that is a presentation question. But it is another thing if cash or share movements affect the wrong players, at least as it is shown in the UI. That would be a bug. It is well possible that the effects of the changed player order have not yet been fully worked out, but to look into that I need an example. Do you have a saved file that I can run against the current code and that shows the bug? If I need any of your new code to show this bug, you could send me a patch. In the new Git environment I can easily create a local branch that does not affect the central repository. (I have one 1880 saved file from you, but it doesn’t load because it appears to require a class rails.game.specific._1880.StockMarket_1880 that I don’t have.) Erik. From: Dr. Martin Brumm [mailto:dr....@t-...] Sent: Friday, August 12, 2011 7:30 AM To: Rails Developer Liste Subject: [Rails-devel] GameManager and players array problem (Java implementation of reordering players) Hi Brett, Erik and Stefan et al. For the background information, 1880 and a number of other games change the seat order after the starting or in the starting round based on certain auction results. Eric helped me to bring in a reorder routine in rails.game.gamemanager called reorderPlayerByCash which should reorder the players array based on their wallet. This seems to function well inside the scope of the Roundclass and its subclasses. But to my astonishment or Javanewbeeness the changed array players doesn’t show in the gameManager itself if you watch the array in debug mode outside of the Roundclasses (i.e. rails.ui.swing.startwindow and Statuswindow). So naturally the changed playerorder cant be accessed from that classes and thus the changed seating order doesn’t reflect it self in the ui. Whereas the actions taken in the rounds are nevertheless credited right in the ui display. This leads in a Stockround to the funny actions that Player A is shown as active and upon acting his action leads to result for player C for example. So if anyone of you could point me at the silly simple (I assume) mistake in my train of thought in implementing the reordering I would be very grateful. Regards, Martin |