tobymao / 18xx

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

[18EU] Stuck game state: Player cannot discard minors or advance the game state. Game ID:161379 #10787

Open hamigua2000 opened 1 month ago

hamigua2000 commented 1 month ago

What's your Game ID?

161379

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

How to Reproduce the Bug?

The game is currently in the bug state.

Which Browser / Platform?

Not sure which browser the stuck player is using, but I master moded it and was stuck using both Chrome and Firefox.

benjaminxscott commented 1 month ago

looks like the set of possible actions is empty (due to the player having already acted this round?) but the round isn't ending (game.minor_exchange isn't set to done ?)

https://github.com/tobymao/18xx/blob/master/lib/engine/game/g_18_eu/step/final_exchange.rb#L15

benjaminxscott commented 1 month ago

cc @andrewzwicky if he's active

andrewzwicky commented 1 month ago

It looks like it thinks it's connected to the Neutral corp, which is used for the open city. I'm not sure when I might be able to properly test/validate/fix that. If someone else wants to fix it, my initial stab was to change the following line: https://github.com/tobymao/18xx/blob/a18c87f80572fb4e2954fb453598b0c91f18ab92/lib/engine/game/g_18_eu/game.rb#L352 to: (connected + colocated).uniq.reject(&:minor?).reject{ |corp| corp&.full_name == 'Neutral' }

image