Closed ianwilson156 closed 1 week ago
Looks like the 4D isn't behaving as intended. It seems to be counting (and doubling) the dits on the route. The mine bonus is wrong too, as you noticed.
The second problem is caused by adding the mine bonus for each train. This broke when I was asked to refactor my code to use the "extra_revenue" method.
I guess that a 4D could count (and double) a dit, if it had to - that is, there weren't enough cities. Unlikely, but you never know. It is supposed to count the 4 best revenue locations (one with a token).
I haven't gotten to the bottom of the first issue yet. As far as I know, I haven't changed the code in a way that the 4D won't work correctly. Other games have 4Ds defined exactly the same way (and presumably work).
Which other games? I can only think of Ardennes, but in that the 4D must skip dits.
I thought 18NY had a 4DE train that was similar, but now that I look at the rules it only counts stations with tokens and offboards. Hmmm.
Found the bug, I was double-counting the doubled route bonuses for Scotland/Wales/London-Port. I went out of my way to double the revenue. Another bug caused by a change that I was suggested to make.
https://18xx.games/game/184158
OR7.2, DGN running a 4D from London to S. Ireland via Birmingham & Coventry. I make that 2*(100+50+70+30+30(Wales)+40(Lon-port)) = 640, but the program calculates 780. It also gives a 80 mine bonus, but that is not doubled by the 4D, so should be only 40..