From: Erik V. <eri...@xs...> - 2012-01-26 21:16:39
|
Done. The only thing needed was to exempt the player names list from reordering. This list was in fact only in one place used for other purposes than saving, and that single existing usage could easily be replaced. So I could also remove getPlayerNames() from the GameManagerI interface. As a bonus, I noticed, that the UI now shows the *reordered* player names in the UI after reloading . So that’s a first step in fixing the other problems. Erik. From: Erik Vos [mailto:eri...@xs...] Sent: Thursday, January 26, 2012 9:56 PM To: Dr....@t-...; 'Rails Development' Subject: Re: [Rails-devel] Fw: Re: Push Request : 1880 Code Update Part II Indeed the problem seems to be that the *current* player sequence is saved, instead of the *original* sequence. When reloading, the game engine replays the game from the start, so the original player names list must be saved. That should be easy to fix. Another problem, is that the player list is not a state variable and so reordering is not undoable. But I’ll leave that as is for a while, as Stefan will turn it upside down anyway. Erik. From: Dr....@t-... [mailto:Dr....@t-...] Sent: Thursday, January 26, 2012 8:12 PM To: Erik Vos; Rails Development Subject: Re: [Rails-devel] Fw: Re: Push Request : 1880 Code Update Part II Hi Erik, please find enclosed the savegame. The problem arises fro the fact that in 1880 i "artificially" reorder the players based on the outcome of Startround. The game of course only saves actions and some variables and the load mechanismn cant determine the changed player order. This leads to the fact that the playername array will have the original player as actionstarter "A" while getcurrentplayer() of course returns the new playerorder (in this case "C") as the players-array has been reordered after the startinground and C ist the player with the fewest money thus the first player in the new seat order. How do we want to go here ? If we add the original seat order as additional data to be saved we still have the problem to be solved that the actions up to a specific point in game time (end of Startround) which we currently cant pinpoint (as only actions get saved and restored), are connected to the wrong player. Should we perhaps create a special action that then can be saved ? and of course must be run automatically ? or manually ? Regards, Martin Von: "Erik Vos" <eri...@xs...> An: <Dr....@t-...> Cc: "Development list for Rails: an 18xx game" <rai...@li...> Betreff: RE: [Rails-devel] Fw: Re: Push Request : 1880 Code Update Part II Datum: Thu, 26 Jan 2012 14:45:07 +0100 Martin, OK, let's work on these issues together. 1. The simple way out would be to change highlighting only, but I would immediately concede that actually changing the visible player order is much better. So let's aim for that. However, before making plans, we should have a solution to the next problem as well. 2. Apparently, the player order change has not yet been fully worked out. Can you send me a saved file that doesn't reload, so I can check out why it fails? 3. This is a different matter that we can deal with separately. In any case, it's OK to start with using modal popups, which is much easier. Once that works, it's not a big deal to refactor to use non-modal popups. I can pick up the second part, or all of it if you still don't feel happy about it. Erik. From: Dr....@t-... [mailto:Dr....@t-...] Sent: Wednesday, January 25, 2012 10:02 PM To: Erik Vos Subject: Re: [Rails-devel] Fw: Re: Push Request : 1880 Code Update Part II Hi Erik, a number jump to my mind :) Problem 1: Based on the Fact that the PlayerOrder can change afte the outcome of the StartRound we need to have a flag to switch that order around and let the UI know that it needs to be aware of a new playerorder: Subsequently. 1. The upperPlayerCaption and lowerPlayerCaption need to be updated with the new player order. 2. the player related fields need to be updated also in new order. Currently the player order gets changed, the wrong player is shown as acting but the right player credited with the action. I.e. Player order in Display is A B C D, player c has fewest money after start is now starting player for stock round. Player A is highlighted performs an action and result of action is credited to player c in display. (this is right but confusing as player c should have moved in display to first colomn been highlighted and shown as performing the action :)) Problem 2: The reordering of players causes the game to reject any save game after the initial Startround. Player x cant perform that action... Problem 3: The StartCompany-mechanismn is now for StartroundWindow two actions subsequently (Because the share size of the BCR president share is fixed..) For each other company its three actions in order: a) Determine the startprice/startingorderposition b) Determine the size of the presidents share -20/30/40% c) Determine the BuildingRight based on restrictions from the presidents share (40& Shares can only have Phase A or B or C or D, 30% can have 2 Phases and 20% can have 3 Phases (A+B+C, B+C+D) This in connection with the radiobuttoncode is beyond my skills yet :) Those are my most urgent problems where the wall is to stubborn to give way to my head ! Regards, Martin P.s. your comments where helpful and the right way to show me the way around, i can take positive criticismn :) |