Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18SJ] Corrects edge case nationalization calculation #11205

Merged
merged 5 commits into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/engine/game/g_18_sj/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -788,10 +788,8 @@ def perform_nationalization
return
end

# Merge the corporation with highest share price, and use the first operated as tie break
merged = candidates.max_by { |c| [c.share_price.price, [email protected]_index(c)] }

nationalize_major(merged)
# nationalizes the highest-valued trainless corp (which has already operated) after a rusting event
nationalize_major(candidates.min)
end

# If there are 2 station markers on the same city the
Expand Down
Loading