Skip to content

Commit

Permalink
Update lib/engine/game/g_18_uruguay/nationalization.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Oliver Burnett-Hall <[email protected]>
  • Loading branch information
patrikolesen and ollybh authored Dec 29, 2024
1 parent 96dd924 commit 937b22f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/engine/game/g_18_uruguay/nationalization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ def acquire_shares
sum + (secondary_corps.president?(holder) ? 1 : 0)
end
num_shares += from_secondary
bundle = Engine::ShareBundle.new(@fce.shares.take(9)) if num_shares == 10
bundle = Engine::ShareBundle.new(@fce.shares.reject(&:president).take(num_shares)) unless num_shares == 10
bundle =
if num_shares == 10
Engine::ShareBundle.new(@fce.shares.take(9))
else
Engine::ShareBundle.new(@fce.shares.reject(&:president).take(num_shares))
end
@share_pool.transfer_shares(bundle, holder, allow_president_change: true)
@log << "#{holder.name} receives #{num_shares * 10}% in FCE in exchange to the nationalized shares"

Expand Down

0 comments on commit 937b22f

Please sign in to comment.