Skip to content

Commit

Permalink
[18BF] Fix making U1/U2 private companies available
Browse files Browse the repository at this point in the history
Array.delete doesn't take a block to find an element to delete, and
doesn't return the elements deleted.
  • Loading branch information
ollybh committed May 29, 2023
1 parent 5b0b38c commit 27f2343
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/engine/game/g_18_bf/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,14 @@ def event_minors_batch3!
end

def event_u1_available!
u1 = @future_companies.delete { |company| company.sym == 'U1' }
u1 = @future_companies.find { |company| company.sym == 'U1' }
@future_companies.delete(u1)
@companies << u1
end

def event_u2_available!
u2 = @future_companies.delete { |company| company.sym == 'U2' }
u2 = @future_companies.find { |company| company.sym == 'U2' }
@future_companies.delete(u2)
@companies << u2
end

Expand Down

0 comments on commit 27f2343

Please sign in to comment.