tobymao / 18xx

A platform for playing 18xx games online!
https://18xx.games
Other
279 stars 182 forks source link

[1837] Implementation List #11101

Open crericha opened 1 month ago

crericha commented 1 month ago

General

Phases

Events:

Stock Market

Trains

Mountain Railways

Minor Companies

Coal Companies

Major Corporations

National Railways

Initial Auction

Stock Round

Operating Round

Coal Company Exchange

National Railway Formation

Game End

ollybh commented 1 month ago

Can backtrack to lay stations (need to figure out exactly what that means)

When working out where you can place tokens, you're allowed to go the wrong way at track junctions. This is most important for the BH major – it's fairly common for this company to be started by the player who owns the BB coal company. Before starting the BH the BB will have upgraded hex O19 to a #25 tile, with one path from the mine to the town in O17, and the other from the mine towards Sarajevo. On its first turn BH can place a tile in Sarajevo connecting to the #25 tile and then trace a route through O19, reversing at the junction and place a token it one of the cities closer to Vienna. This means it will be able to run the G-train inherited from BB for a decent amount on its first turn.

So you're probably going to have to have two graphs, one for tokens, and one for track and trains. And the token graph will have to be calculated differently, which could be a challenge.

ollybh commented 1 month ago

One point to the list for track laying: town upgrades are different from normal. Yellow single town tiles upgrade to a green tile with the existing path with a town, and a second path without a town. Yellow double town tiles upgrade to a green single town tile with a K/X/trident-arrangement that keeps the same exits that were on the yellow tile.

ollybh commented 1 month ago

For dividends from the four-share minors (Ug1 and Ug3), you round fractions when working out how much each player will earn, not how much each share will pay.

If Ug1 runs for 50K, then a player who owns one share (25%) will receive 12K, but if a player owns both shares (50%) they will receive 25K, not 24K.

crericha commented 1 month ago

Can backtrack to lay stations (need to figure out exactly what that means)

When working out where you can place tokens, you're allowed to go the wrong way at track junctions. This is most important for the BH major – it's fairly common for this company to be started by the player who owns the BB coal company. Before starting the BH the BB will have upgraded hex O19 to a #25 tile, with one path from the mine to the town in O17, and the other from the mine towards Sarajevo. On its first turn BH can place a tile in Sarajevo connecting to the #25 tile and then trace a route through O19, reversing at the junction and place a token it one of the cities closer to Vienna. This means it will be able to run the G-train inherited from BB for a decent amount on its first turn.

So you're probably going to have to have two graphs, one for tokens, and one for track and trains. And the token graph will have to be calculated differently, which could be a challenge.

@ollybh If the token graph thought the tiles were lawson, it'd maybe automatically do the backtracking?

scottredracecar commented 1 month ago

Without looking up the rule, I believe you can only do one "backtrack." I have no ideas how to implement that, but treating as Lawson seems like a fine thing to do in the meantime as a hack (ignoring the 1 back track limit). The BH has a lot of trouble without the backtrack rule.

On Sun, Aug 11, 2024 at 8:18 PM Chris Rericha @.***> wrote:

Can backtrack to lay stations (need to figure out exactly what that means)

When working out where you can place tokens, you're allowed to go the wrong way at track junctions. This is most important for the BH major – it's fairly common for this company to be started by the player who owns the BB coal company. Before starting the BH the BB will have upgraded hex O19 to a #25 https://github.com/tobymao/18xx/issues/25 tile, with one path from the mine to the town in O17, and the other from the mine towards Sarajevo. On its first turn BH can place a tile in Sarajevo connecting to the #25 https://github.com/tobymao/18xx/issues/25 tile and then trace a route through O19, reversing at the junction and place a token it one of the cities closer to Vienna. This means it will be able to run the G-train inherited from BB for a decent amount on its first turn.

So you're probably going to have to have two graphs, one for tokens, and one for track and trains. And the token graph will have to be calculated differently, which could be a challenge.

@ollybh https://github.com/ollybh If the token graph thought the tiles were lawson, it'd maybe automatically do the backtracking?

— Reply to this email directly, view it on GitHub https://github.com/tobymao/18xx/issues/11101#issuecomment-2283046954, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG6CEXBG4FNUSSJBQNX2JSLZRASP3AVCNFSM6AAAAABL6S3UOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBTGA2DMOJVGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

crericha commented 1 month ago

I happen to have the rules open. Looks like it is unlimited backtracking.

For the purpose of playing tokens only, the route between a corporation’s home station and the new one may involve backtracking (multiple times if necessary)

ollybh commented 1 month ago

@ollybh If the token graph thought the tiles were lawson, it'd maybe automatically do the backtracking?

I don't know the internals of the graph walking code well, but I had assumed that it is the junction parts on Lawson-type tiles are what lets the graph walk head off in any direction, and these tiles will not have these.

For most tiles it would work if you assumed that there are invisible paths between all edges with track on a plain/town tiles (so on a #23 tile as well as the paths between edges 0 and 3 and 0 and 4, you have an extra one between edges 3 and 4). But that wouldn't work with tiles like #16 to #20 where there are two separate tracks without a junction to backtrack at.