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 b6c664b commit e0f148c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/engine/game/g_18_uruguay/nationalization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ def acquire_shares
entity_shares = affected_shares(holder, @merge_data[:corps])

total_percent = entity_shares.sum(&:percent)
num_shares = (total_percent / 20).to_i
odd_share = num_shares * 20 != total_percent
num_shares, odd_shares = (total_percent / 10).divmod(2)
from_secondary = @merge_data[:secondary_corps].reduce(0) do |sum, secondary_corps|
sum + (secondary_corps.president?(holder) ? 1 : 0)
end
Expand Down

0 comments on commit e0f148c

Please sign in to comment.