Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
crericha committed Oct 9, 2024
1 parent 7de6e43 commit 14a7fee
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
10 changes: 5 additions & 5 deletions lib/engine/game/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -810,9 +810,9 @@ def process_action(action, add_auto_actions: false, validate_auto_actions: false
@last_processed_action = action.id

self
#rescue StandardError => e
# rescue_exception(e, action)
# self
# rescue StandardError => e
# rescue_exception(e, action)
# self
end

def process_single_action(action)
Expand All @@ -838,8 +838,8 @@ def process_single_action(action)
transition_to_next_round!
end
end
#rescue Engine::GameError => e
# rescue_exception(e, action)
# rescue Engine::GameError => e
# rescue_exception(e, action)
end

def rescue_exception(e, action)
Expand Down
2 changes: 1 addition & 1 deletion lib/engine/game/g_1840/step/dividend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def payout_corporation(amount, entity)
major.spend(to_pay, @game.bank)
end

def log_run_payout(entity, kind, revenue, subsidy, action, payout)
def log_run_payout(entity, kind, revenue, _subsidy, action, payout)
unless Dividend::DIVIDEND_TYPES.include?(kind)
@log << "#{entity.name} runs for #{@game.format_currency(revenue)} and pays #{action.kind}"
end
Expand Down
4 changes: 1 addition & 3 deletions lib/engine/game/g_1856/step/dividend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ def payout_per_share(entity, revenue)
(revenue / entity.total_shares.to_f)
end



def share_price_change(entity, _revenue)
# Share price of national does not change until it owns a permanent
return {} if entity == @game.national && !@game.national_ever_owned_permanent
Expand All @@ -49,7 +47,7 @@ def total_revenue
super - (@round.interest_penalty[@round.current_operator] || 0)
end

def log_run_payout(entity, kind, revenue, subsidy, action, payout)
def log_run_payout(entity, kind, revenue, _subsidy, action, payout)
if (@round.interest_penalty[entity] || 0).positive?
@log << "#{entity.name} deducts #{@game.format_currency(@round.interest_penalty[entity])}"\
' for unpaid interest'
Expand Down
2 changes: 1 addition & 1 deletion lib/engine/game/g_1873/step/dividend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def process_dividend(action)
pass!
end

def log_run_payout(entity, kind, revenue, subsidy, action, payout)
def log_run_payout(entity, kind, revenue, _subsidy, action, payout)
unless Dividend::DIVIDEND_TYPES.include?(kind)
@log << "#{entity.name} runs for #{@game.format_currency(revenue)} and pays #{action.kind}"
end
Expand Down

0 comments on commit 14a7fee

Please sign in to comment.