tobymao / 18xx

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

[1868 Wyoming] P7 token moved from one train to another #10068

Closed danderdag closed 8 months ago

danderdag commented 10 months ago

https://18xx.games/game/144719

[10:43] RCL moves the [+1+1] token from a 3+2 train to a 4+3 train, forming a [5+4] train [10:43] RCL passes buy trains [10:43] RCL passes buy companies ... [13:46] -- Operating Round 3.2 (of 2) -- [13:46] danderdag operates RCL [13:48] RCL spends $10 and lays tile #9 with rotation 2 on F20 [13:48] RCL spends $10 and lays tile #9 with rotation 2 on G21 (Ft. Fetterman) [13:48] RCL spends $10 and lays tile #5b with rotation 1 on H22 (Douglas) [13:48] RCL places a token on D20 (Donkey Town) for $60 [13:48] RCL passes double-head trains [13:49] RCL runs a [4+3] train for $70: A23-C27 + 1 Fort [13:49] RCL runs a 4+3 train for $250: A11-B12-B16-C17-D20-D24-C27 + E/W + 1 Fort [13:49] RCL pays out $320 = $32 per share ($160 to danderdag, $64 to philcampeau, $64 to Eonthar, $32 to Jasonbartfast) [13:49] RCL's share price moves up and right from $140 to $180 (2 steps) [13:49] RCL passes buy trains [13:49] RCL passes buy companies

In operating round 3.1, I assigned the token on my 4+3 train and we can see in the operating round 3.2 the token appears to be still on my 3+2 train, but when I ran the train, the 4+3 train hit 5 cities (A11, B16, C17, D20 and C27) and 2 town (B12 and D24).

Now that the 3 trains have rusted in OR 4.2, the token was removed from my 4+3 train, when my 3+2 train rusted even though it was just a display glitch in the transcript. Since you can only assign the token in the train purchase phase, I missed out on the additional stop in OR 4.2.

Thanks for looking into fixing this bug.

michaeljb commented 8 months ago

Finally taking a look at this

gist

RCL's turn in OR 3.2 - https://18xx.games/game/144719?action=441

RCL's turn in OR 4.1 - https://18xx.games/game/144719?action=524

6-train is bought, rusting the 3s - https://18xx.games/game/144719?action=596

RCL's turn in OR 4.2 - https://18xx.games/game/144719?action=648

michaeljb commented 8 months ago

OR 2.2 - https://18xx.games/game/144719?action=283

RCL buys P7 American Locomotive Corporation 4-8-8-4 "Big Boy" Wasatch Class Locomotive from danderdag for $100 RCL attaches the [+1+1] token to a 3+2 train, forming a [4+3] train

    {
      "type": "choose",
      "entity": "RCL",
      "entity_type": "corporation",
      "id": 283,
      "created_at": 1703097568,
      "choice": "2"
    }

OR 3.1 - https://18xx.games/game/144719?action=363

RCL forms a [6+5] train by double heading trains: 2+2, 3+2

that log message could say [4+3] instead of 3+2, but no big deal

    {
      "type": "double_head_trains",
      "entity": "RCL",
      "entity_type": "corporation",
      "id": 363,
      "created_at": 1703432408,
      "trains": [
        "2-4",
        "3-3"
      ]
    }

After running and paying the [6+5], RCL is back to having a 2, 2+2, and [4+3]

https://18xx.games/game/144719?action=367

RCL moves the [+1+1] token from a 3+2 train to a 4+3 train, forming a [5+4] train

    {
      "type": "choose",
      "entity": "RCL",
      "entity_type": "corporation",
      "id": 367,
      "created_at": 1703432590,
      "choice": "0"
    }

https://18xx.games/game/144719?action=433

At the start of OR 3.2, RCL has a 4+3 and a [4+3] instead of [5+4] and 3+2, something is going wrong between actions 367 and 433

michaeljb commented 8 months ago

The logs at action 367 are mismatched on the browser vs ruby console

browser:

RCL moves the [+1+1] token from a 3+2 train to a 4+3 train, forming a [5+4] train

console:

RCL moves the [+1+1] token from a 5+4 train to a 3+2 train, forming a [4+3] train

The choice value should be the target train ID instead of an index. The list of choices must be sorted differently somehow in the different environments.