From 27f234378e05450bfc37df0e526eb8a1ff9cf6e7 Mon Sep 17 00:00:00 2001 From: Oliver Burnett-Hall Date: Mon, 29 May 2023 14:11:39 +0100 Subject: [PATCH] [18BF] Fix making U1/U2 private companies available Array.delete doesn't take a block to find an element to delete, and doesn't return the elements deleted. --- lib/engine/game/g_18_bf/game.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/engine/game/g_18_bf/game.rb b/lib/engine/game/g_18_bf/game.rb index 13a1592354..63ea98fe2c 100644 --- a/lib/engine/game/g_18_bf/game.rb +++ b/lib/engine/game/g_18_bf/game.rb @@ -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