From: Stefan F. <ste...@we...> - 2013-10-14 14:30:16
|
Erik: I will try to cover the remaining 1835 bugs in the near future. This new one below seems tricky as I remember some discussion in the past on the 18xx yahoo list about when and how the minors/privates merge into the Prussian major. Could you tell me how you determine when the Prussian is allowed to operate and who gets dividends paid out? In any case paying negative amounts seems plain wrong or is this some kind of a workaround? Thanks, Stefan On 10/14/2013 11:49 AM, Pieter Lust wrote: > Hi > > In a recent game of 1835 with Rails the following occurred: > > The Prussian was started in operating round 8.1 . Some privates and > minors merged, but not all. The Prussian didn't operate. > At the start of operating round 8.2, one minor merged into the Prussian. > Player holdings were: > Stan: 10% Prussian, M1 (not converted yet), BB private > Dave: no Prussian shares, M6 > Neil: 20% Prussian > Pier: 15% Prussian, M3, PfB private > Easterly1: 30%, no minors > > The Prussian then operated, and paid dividends. This was the output from > rails: > > PR pays out full dividend of 150M > Stan gets no income for 15% PR shares as precursors have operated > Pier gets no income for 5% PR shares as precursors have operated > Stan receives -7M for -1 5% shares > Pier receives 15M for 2 5% shares > Easterly1 receives 45M for 6 5% shares > Neil receives 30M for 4 5% shares > > This seems wrong: the minors didn't operate in the current operating > round, so all converted shares should receive a dividend. > > Is this a bug? > > Sincerely > > Pieter > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Rails-users mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-users > |
From: Erik V. <eri...@xs...> - 2013-10-14 22:37:39
|
Clearly negative amounts are erroneous. But without a saved file it's hard to track down such bugs. I'll try to provide some answers tomorrow. Erik > -----Original Message----- > From: Stefan Frey [mailto:ste...@we...] > Sent: Monday, October 14, 2013 4:30 PM > To: Development list for Rails: an 18xx game > Cc: pie...@ho... > Subject: Re: [Rails-devel] [Rails-users] Bug with Prussian dividends in 1835? > > Erik: > I will try to cover the remaining 1835 bugs in the near future. > > This new one below seems tricky as I remember some discussion in the past > on the 18xx yahoo list about when and how the minors/privates merge into > the Prussian major. > > Could you tell me how you determine when the Prussian is allowed to > operate and who gets dividends paid out? > > In any case paying negative amounts seems plain wrong or is this some kind > of a workaround? > > Thanks, > Stefan > > On 10/14/2013 11:49 AM, Pieter Lust wrote: > > Hi > > > > In a recent game of 1835 with Rails the following occurred: > > > > The Prussian was started in operating round 8.1 . Some privates and > > minors merged, but not all. The Prussian didn't operate. > > At the start of operating round 8.2, one minor merged into the Prussian. > > Player holdings were: > > Stan: 10% Prussian, M1 (not converted yet), BB private > > Dave: no Prussian shares, M6 > > Neil: 20% Prussian > > Pier: 15% Prussian, M3, PfB private > > Easterly1: 30%, no minors > > > > The Prussian then operated, and paid dividends. This was the output > > from > > rails: > > > > PR pays out full dividend of 150M > > Stan gets no income for 15% PR shares as precursors have operated Pier > > gets no income for 5% PR shares as precursors have operated Stan > > receives -7M for -1 5% shares Pier receives 15M for 2 5% shares > > Easterly1 receives 45M for 6 5% shares Neil receives 30M for 4 5% > > shares > > > > This seems wrong: the minors didn't operate in the current operating > > round, so all converted shares should receive a dividend. > > > > Is this a bug? > > > > Sincerely > > > > Pieter > > > > > > ---------------------------------------------------------------------- > > -------- October Webinars: Code for Performance Free Intel webinars > > can help you accelerate application performance. > > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the > > most from the latest Intel processors and coprocessors. See abstracts > > and register > > > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.c > > lktrk > > > > > > > > _______________________________________________ > > Rails-users mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-users > > > > > ---------------------------------------------------------------------------- -- > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from the latest Intel processors and coprocessors. See abstracts and register > > > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clk > trk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Erik V. <eri...@xs...> - 2013-10-15 10:48:57
|
Can anyone remind me how to configure the new Git repo location in git bash? I can't find the config file, and there doesn't seem to be a lot of help on this matter. Erik > -----Original Message----- > From: Erik Vos [mailto:eri...@xs...] > Sent: Tuesday, October 15, 2013 12:38 AM > To: 'Development list for Rails: an 18xx game' > Subject: Re: [Rails-devel] [Rails-users] Bug with Prussian dividends in 1835? > > Clearly negative amounts are erroneous. But without a saved file it's hard to > track down such bugs. > I'll try to provide some answers tomorrow. > Erik > > > -----Original Message----- > > From: Stefan Frey [mailto:ste...@we...] > > Sent: Monday, October 14, 2013 4:30 PM > > To: Development list for Rails: an 18xx game > > Cc: pie...@ho... > > Subject: Re: [Rails-devel] [Rails-users] Bug with Prussian dividends > > in > 1835? > > > > Erik: > > I will try to cover the remaining 1835 bugs in the near future. > > > > This new one below seems tricky as I remember some discussion in the > > past on the 18xx yahoo list about when and how the minors/privates > > merge into the Prussian major. > > > > Could you tell me how you determine when the Prussian is allowed to > > operate and who gets dividends paid out? > > > > In any case paying negative amounts seems plain wrong or is this some > > kind of a workaround? > > > > Thanks, > > Stefan > > > > On 10/14/2013 11:49 AM, Pieter Lust wrote: > > > Hi > > > > > > In a recent game of 1835 with Rails the following occurred: > > > > > > The Prussian was started in operating round 8.1 . Some privates and > > > minors merged, but not all. The Prussian didn't operate. > > > At the start of operating round 8.2, one minor merged into the Prussian. > > > Player holdings were: > > > Stan: 10% Prussian, M1 (not converted yet), BB private > > > Dave: no Prussian shares, M6 > > > Neil: 20% Prussian > > > Pier: 15% Prussian, M3, PfB private > > > Easterly1: 30%, no minors > > > > > > The Prussian then operated, and paid dividends. This was the output > > > from > > > rails: > > > > > > PR pays out full dividend of 150M > > > Stan gets no income for 15% PR shares as precursors have operated > > > Pier gets no income for 5% PR shares as precursors have operated > > > Stan receives -7M for -1 5% shares Pier receives 15M for 2 5% shares > > > Easterly1 receives 45M for 6 5% shares Neil receives 30M for 4 5% > > > shares > > > > > > This seems wrong: the minors didn't operate in the current operating > > > round, so all converted shares should receive a dividend. > > > > > > Is this a bug? > > > > > > Sincerely > > > > > > Pieter > > > > > > > > > -------------------------------------------------------------------- > > > -- > > > -------- October Webinars: Code for Performance Free Intel webinars > > > can help you accelerate application performance. > > > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the > > > most from the latest Intel processors and coprocessors. See > > > abstracts and register > > > > > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg > > > .c > > > lktrk > > > > > > > > > > > > _______________________________________________ > > > Rails-users mailing list > > > Rai...@li... > > > https://lists.sourceforge.net/lists/listinfo/rails-users > > > > > > > > > > ---------------------------------------------------------------------------- > -- > > October Webinars: Code for Performance Free Intel webinars can help > > you accelerate application performance. > > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the > > most from the latest Intel processors and coprocessors. See abstracts > > and > register > > > > > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.c > > lk > > trk > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > ---------------------------------------------------------------------------- -- > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from the latest Intel processors and coprocessors. See abstracts and register > > > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clk > trk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Stefan F. <ste...@we...> - 2013-10-15 11:11:24
|
Erik: I assume how to move to the changed URL of the git repo, as sourceforge changed that: Take a look here: http://stackoverflow.com/questions/2432764/how-to-change-a-remote-repository-uri-using-git Your remote URL (including your username) is shown under Code after you have logged into sourceforge. https://sourceforge.net/p/rails/code/ci/master/tree/ Hope this works for you. Stefan On 10/15/2013 12:48 PM, Erik Vos wrote: > Can anyone remind me how to configure the new Git repo location in git bash? > I can't find the config file, and there doesn't seem to be a lot of help on > this matter. > Erik > >> -----Original Message----- >> From: Erik Vos [mailto:eri...@xs...] >> Sent: Tuesday, October 15, 2013 12:38 AM >> To: 'Development list for Rails: an 18xx game' >> Subject: Re: [Rails-devel] [Rails-users] Bug with Prussian dividends in > 1835? >> >> Clearly negative amounts are erroneous. But without a saved file it's > hard to >> track down such bugs. >> I'll try to provide some answers tomorrow. >> Erik >> >>> -----Original Message----- >>> From: Stefan Frey [mailto:ste...@we...] >>> Sent: Monday, October 14, 2013 4:30 PM >>> To: Development list for Rails: an 18xx game >>> Cc: pie...@ho... >>> Subject: Re: [Rails-devel] [Rails-users] Bug with Prussian dividends >>> in >> 1835? >>> >>> Erik: >>> I will try to cover the remaining 1835 bugs in the near future. >>> >>> This new one below seems tricky as I remember some discussion in the >>> past on the 18xx yahoo list about when and how the minors/privates >>> merge into the Prussian major. >>> >>> Could you tell me how you determine when the Prussian is allowed to >>> operate and who gets dividends paid out? >>> >>> In any case paying negative amounts seems plain wrong or is this some >>> kind of a workaround? >>> >>> Thanks, >>> Stefan >>> >>> On 10/14/2013 11:49 AM, Pieter Lust wrote: >>>> Hi >>>> >>>> In a recent game of 1835 with Rails the following occurred: >>>> >>>> The Prussian was started in operating round 8.1 . Some privates and >>>> minors merged, but not all. The Prussian didn't operate. >>>> At the start of operating round 8.2, one minor merged into the > Prussian. >>>> Player holdings were: >>>> Stan: 10% Prussian, M1 (not converted yet), BB private >>>> Dave: no Prussian shares, M6 >>>> Neil: 20% Prussian >>>> Pier: 15% Prussian, M3, PfB private >>>> Easterly1: 30%, no minors >>>> >>>> The Prussian then operated, and paid dividends. This was the output >>>> from >>>> rails: >>>> >>>> PR pays out full dividend of 150M >>>> Stan gets no income for 15% PR shares as precursors have operated >>>> Pier gets no income for 5% PR shares as precursors have operated >>>> Stan receives -7M for -1 5% shares Pier receives 15M for 2 5% shares >>>> Easterly1 receives 45M for 6 5% shares Neil receives 30M for 4 5% >>>> shares >>>> >>>> This seems wrong: the minors didn't operate in the current operating >>>> round, so all converted shares should receive a dividend. >>>> >>>> Is this a bug? >>>> >>>> Sincerely >>>> >>>> Pieter >>>> >>>> >>>> -------------------------------------------------------------------- >>>> -- >>>> -------- October Webinars: Code for Performance Free Intel webinars >>>> can help you accelerate application performance. >>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the >>>> most from the latest Intel processors and coprocessors. See >>>> abstracts and register > >>>> >> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg >>>> .c >>>> lktrk >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rails-users mailing list >>>> Rai...@li... >>>> https://lists.sourceforge.net/lists/listinfo/rails-users >>>> >>> >>> >>> >> > ---------------------------------------------------------------------------- >> -- >>> October Webinars: Code for Performance Free Intel webinars can help >>> you accelerate application performance. >>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the >>> most from the latest Intel processors and coprocessors. See abstracts >>> and >> register >>>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.c >>> lk >>> trk >>> _______________________________________________ >>> Rails-devel mailing list >>> Rai...@li... >>> https://lists.sourceforge.net/lists/listinfo/rails-devel >> >> >> > ---------------------------------------------------------------------------- > -- >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most >> from the latest Intel processors and coprocessors. See abstracts and > register >>> >> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clk >> trk >> _______________________________________________ >> Rails-devel mailing list >> Rai...@li... >> https://lists.sourceforge.net/lists/listinfo/rails-devel > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: Erik V. <eri...@xs...> - 2013-10-15 12:59:56
|
Thanks, that works. Although I'm now getting a bunch of merge conflicts, which surprises me, as I haven't changed anything since my last pull. Erik > -----Original Message----- > From: Stefan Frey [mailto:ste...@we...] > Sent: Tuesday, October 15, 2013 1:11 PM > To: rai...@li... > Subject: [Rails-devel] Change git repo url (was: Bug with Prussian dividends in > 1835?) > > Erik: > I assume how to move to the changed URL of the git repo, as sourceforge > changed that: > > Take a look here: > http://stackoverflow.com/questions/2432764/how-to-change-a-remote- > repository-uri-using-git > > Your remote URL (including your username) is shown under Code after you > have logged into sourceforge. > > https://sourceforge.net/p/rails/code/ci/master/tree/ > > Hope this works for you. > > Stefan > > On 10/15/2013 12:48 PM, Erik Vos wrote: > > Can anyone remind me how to configure the new Git repo location in git > bash? > > I can't find the config file, and there doesn't seem to be a lot of > > help on this matter. > > Erik > > > >> -----Original Message----- > >> From: Erik Vos [mailto:eri...@xs...] > >> Sent: Tuesday, October 15, 2013 12:38 AM > >> To: 'Development list for Rails: an 18xx game' > >> Subject: Re: [Rails-devel] [Rails-users] Bug with Prussian dividends > >> in > > 1835? > >> > >> Clearly negative amounts are erroneous. But without a saved file > >> it's > > hard to > >> track down such bugs. > >> I'll try to provide some answers tomorrow. > >> Erik > >> > >>> -----Original Message----- > >>> From: Stefan Frey [mailto:ste...@we...] > >>> Sent: Monday, October 14, 2013 4:30 PM > >>> To: Development list for Rails: an 18xx game > >>> Cc: pie...@ho... > >>> Subject: Re: [Rails-devel] [Rails-users] Bug with Prussian dividends > >>> in > >> 1835? > >>> > >>> Erik: > >>> I will try to cover the remaining 1835 bugs in the near future. > >>> > >>> This new one below seems tricky as I remember some discussion in the > >>> past on the 18xx yahoo list about when and how the minors/privates > >>> merge into the Prussian major. > >>> > >>> Could you tell me how you determine when the Prussian is allowed to > >>> operate and who gets dividends paid out? > >>> > >>> In any case paying negative amounts seems plain wrong or is this > >>> some kind of a workaround? > >>> > >>> Thanks, > >>> Stefan > >>> > >>> On 10/14/2013 11:49 AM, Pieter Lust wrote: > >>>> Hi > >>>> > >>>> In a recent game of 1835 with Rails the following occurred: > >>>> > >>>> The Prussian was started in operating round 8.1 . Some privates and > >>>> minors merged, but not all. The Prussian didn't operate. > >>>> At the start of operating round 8.2, one minor merged into the > > Prussian. > >>>> Player holdings were: > >>>> Stan: 10% Prussian, M1 (not converted yet), BB private > >>>> Dave: no Prussian shares, M6 > >>>> Neil: 20% Prussian > >>>> Pier: 15% Prussian, M3, PfB private > >>>> Easterly1: 30%, no minors > >>>> > >>>> The Prussian then operated, and paid dividends. This was the output > >>>> from > >>>> rails: > >>>> > >>>> PR pays out full dividend of 150M > >>>> Stan gets no income for 15% PR shares as precursors have operated > >>>> Pier gets no income for 5% PR shares as precursors have operated > >>>> Stan receives -7M for -1 5% shares Pier receives 15M for 2 5% > >>>> shares > >>>> Easterly1 receives 45M for 6 5% shares Neil receives 30M for 4 5% > >>>> shares > >>>> > >>>> This seems wrong: the minors didn't operate in the current > >>>> operating round, so all converted shares should receive a dividend. > >>>> > >>>> Is this a bug? > >>>> > >>>> Sincerely > >>>> > >>>> Pieter > >>>> > >>>> > >>>> ------------------------------------------------------------------- > >>>> - > >>>> -- > >>>> -------- October Webinars: Code for Performance Free Intel webinars > >>>> can help you accelerate application performance. > >>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the > >>>> most from the latest Intel processors and coprocessors. See > >>>> abstracts and register > > >>>> > >> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg > >>>> .c > >>>> lktrk > >>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> Rails-users mailing list > >>>> Rai...@li... > >>>> https://lists.sourceforge.net/lists/listinfo/rails-users > >>>> > >>> > >>> > >>> > >> > > ---------------------------------------------------------------------- > > ------ > >> -- > >>> October Webinars: Code for Performance Free Intel webinars can help > >>> you accelerate application performance. > >>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the > >>> most from the latest Intel processors and coprocessors. See > >>> abstracts and > >> register > >>>> > >>> > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg > >>> .c > >>> lk > >>> trk > >>> _______________________________________________ > >>> Rails-devel mailing list > >>> Rai...@li... > >>> https://lists.sourceforge.net/lists/listinfo/rails-devel > >> > >> > >> > > ---------------------------------------------------------------------- > > ------ > > -- > >> October Webinars: Code for Performance Free Intel webinars can help > >> you accelerate application performance. > >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the > >> most from the latest Intel processors and coprocessors. See abstracts > >> and > > register > >>> > >> > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg. > >> clk > >> trk > >> _______________________________________________ > >> Rails-devel mailing list > >> Rai...@li... > >> https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > ---------------------------------------------------------------------- > > -------- October Webinars: Code for Performance Free Intel webinars > > can help you accelerate application performance. > > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the > > most from the latest Intel processors and coprocessors. See abstracts > > and register > > > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.c > > lktrk _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > ---------------------------------------------------------------------------- -- > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from the latest Intel processors and coprocessors. See abstracts and register > > > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clk > trk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Erik V. <eri...@xs...> - 2013-10-15 13:58:33
|
Stefan, Prussian operation looks correct to me, it's the payout process that gets mangled. Here I have tried to implement the rule that one share can never earn income twice in an OR. The problem surfaces in OperatingRound_1835.countSharesPerRecipient(), where a subtraction occurs. I guess there is some error in handling the sharesPerRecipient and/or deniedIncomeShare maps. One point to note is that Stan occurs twice in the payout report of the PR turn. That looks wrong too, and may be a starting point for analysis. Erik > -----Original Message----- > From: Stefan Frey [mailto:ste...@we...] > Sent: Monday, October 14, 2013 4:30 PM > To: Development list for Rails: an 18xx game > Cc: pie...@ho... > Subject: Re: [Rails-devel] [Rails-users] Bug with Prussian dividends in 1835? > > Erik: > I will try to cover the remaining 1835 bugs in the near future. > > This new one below seems tricky as I remember some discussion in the past > on the 18xx yahoo list about when and how the minors/privates merge into > the Prussian major. > > Could you tell me how you determine when the Prussian is allowed to > operate and who gets dividends paid out? > > In any case paying negative amounts seems plain wrong or is this some kind > of a workaround? > > Thanks, > Stefan > > On 10/14/2013 11:49 AM, Pieter Lust wrote: > > Hi > > > > In a recent game of 1835 with Rails the following occurred: > > > > The Prussian was started in operating round 8.1 . Some privates and > > minors merged, but not all. The Prussian didn't operate. > > At the start of operating round 8.2, one minor merged into the Prussian. > > Player holdings were: > > Stan: 10% Prussian, M1 (not converted yet), BB private > > Dave: no Prussian shares, M6 > > Neil: 20% Prussian > > Pier: 15% Prussian, M3, PfB private > > Easterly1: 30%, no minors > > > > The Prussian then operated, and paid dividends. This was the output > > from > > rails: > > > > PR pays out full dividend of 150M > > Stan gets no income for 15% PR shares as precursors have operated Pier > > gets no income for 5% PR shares as precursors have operated Stan > > receives -7M for -1 5% shares Pier receives 15M for 2 5% shares > > Easterly1 receives 45M for 6 5% shares Neil receives 30M for 4 5% > > shares > > > > This seems wrong: the minors didn't operate in the current operating > > round, so all converted shares should receive a dividend. > > > > Is this a bug? > > > > Sincerely > > > > Pieter > > > > > > ---------------------------------------------------------------------- > > -------- October Webinars: Code for Performance Free Intel webinars > > can help you accelerate application performance. > > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the > > most from the latest Intel processors and coprocessors. See abstracts > > and register > > > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.c > > lktrk > > > > > > > > _______________________________________________ > > Rails-users mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-users > > > > > ---------------------------------------------------------------------------- -- > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from the latest Intel processors and coprocessors. See abstracts and register > > > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clk > trk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Martin B. <dr....@t-...> - 2013-10-20 20:54:09
Attachments:
signature.asc
|
Am 15.10.2013 15:58, schrieb Erik Vos: > Stefan, > > Prussian operation looks correct to me, it's the payout process that gets > mangled. > Here I have tried to implement the rule that one share can never earn income > twice in an OR. > > The problem surfaces in OperatingRound_1835.countSharesPerRecipient(), where > a subtraction occurs. > I guess there is some error in handling the sharesPerRecipient and/or > deniedIncomeShare maps. > One point to note is that Stan occurs twice in the payout report of the PR > turn. That looks wrong too, and may be a starting point for analysis. > > Erik > > Hi Erik & Stefan, protected Map<CashHolder, Integer> countSharesPerRecipient () { Map<CashHolder, Integer> sharesPerRecipient = super.countSharesPerRecipient(); if (operatingCompany.get().getName().equalsIgnoreCase(GameManager_1835.PR_ID)) { for (Player player : deniedIncomeShare.keySet()) { if (!sharesPerRecipient.containsKey(player)) continue; int share = deniedIncomeShare.get(player); int shares = share / operatingCompany.get().getShareUnit(); sharesPerRecipient.put (player, sharesPerRecipient.get(player) - shares); ReportBuffer.add(LocalText.getText("NoIncomeForPreviousOperation", player.getName(), share, GameManager_1835.PR_ID)); The Map sharesPerRecipient contains the actual exchanged Prussian shares plus the IPO shares. The map deniedIncomeShare contains the Shares that have operated that round and are NOT included in sharesPerRecipient. So by subtracting those from the SharesPerRecipient in this case (shares have not been exchanged..) its bringing wrong results. protected void initTurn() { super.initTurn(); List<SpecialPropertyI> sps = operatingCompany.get().getSpecialProperties(); if (sps != null && !sps.isEmpty()) { ExchangeForShare efs = (ExchangeForShare) sps.get(0); addIncomeDenialShare (operatingCompany.get().getPresident(), efs.getShare()); } } Here the code adds the shares related to the Minors (still operating) to the DeniedShares but ... nowhere is checked if those are exchanged later on and thus land as Prussianshares in the wallet of the players. What should be done then is on Prussian starting to operate if those deniedshares are still operating and then clear the map deniedIncomeShares, or reduce the amount if not all shares are converted... I think i found a solution here... Map<CashHolder, Integer> sharesPerRecipient = super.countSharesPerRecipient(); if (operatingCompany.get().getName().equalsIgnoreCase(GameManager_1835.PR_ID)) { for (Player player : deniedIncomeShare.keySet()) { if (!sharesPerRecipient.containsKey(player)) continue; int share = deniedIncomeShare.get(player); int shares = share / operatingCompany.get().getShareUnit(); -->>>> if (this.wasInterrupted()) { //Assuming that an OR Interruption was caused by a Formationround for the Prussian.. sharesPerRecipient.put (player, sharesPerRecipient.get(player) - shares); ReportBuffer.add(LocalText.getText("NoIncomeForPreviousOperation", player.getName(), share, GameManager_1835.PR_ID)); } Only then count the deniedshares against shares in the wallet. Comments ? Regards, Martin |