Skip to content

Commit

Permalink
[18Ardennes] Only offer first market share for exchange
Browse files Browse the repository at this point in the history
If a public company had multiple shares in the bank pool then each one
was being offered in exchange for minor companies, giving duplicated
buttons. All the shares are identical, so just offer the first one for
exchange.
  • Loading branch information
ollybh committed Nov 10, 2024
1 parent 5a2ea7a commit 213147c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def sellable_companies(entity)
# exchange for the minor company.
def exchangeable_pool_shares(corporation, ability)
minor = ability.owner
shares = @game.share_pool.shares_by_corporation[corporation]
shares = @game.share_pool.shares_by_corporation[corporation].take(1)
return [] if shares.empty?
return shares if corporation.owner == minor.owner
return shares if corporation.receivership?
Expand Down

0 comments on commit 213147c

Please sign in to comment.