Fix Barcgal activated search test for single target
CI / test (push) Has been cancelled Details

This commit is contained in:
MpakobecEx 2026-10-23 19:11:07 +05:00
parent aa330c6cfa
commit 61576741eb
1 changed files with 15 additions and 2 deletions

View File

@ -857,10 +857,23 @@ public class GameEngineTests
Assert.NotNull(engine.State.PendingChoice);
Assert.Equal(Step.Choice, engine.State.Step);
Assert.True(engine.Execute(new ChooseCommand(0)).Accepted);
// If more than one search target remains, pick a card first; the
// engine skips the card prompt when only one copy is left.
if (engine.State.PendingChoice!.Prompt.IndexOf(
"круг", StringComparison.OrdinalIgnoreCase) < 0)
{
var cardIndex = engine.State.PendingChoice.Options
.FindIndex(option => option.Label.Contains("Flogal"));
Assert.GreaterOrEqual(cardIndex, 0);
Assert.True(engine.Execute(new ChooseCommand(cardIndex)).Accepted);
}
Assert.NotNull(engine.State.PendingChoice);
Assert.True(engine.Execute(new ChooseCommand(1)).Accepted);
var circleIndex = engine.State.PendingChoice!.Options
.FindIndex(option => option.Slot == 2);
Assert.GreaterOrEqual(circleIndex, 0);
Assert.True(engine.Execute(new ChooseCommand(circleIndex)).Accepted);
Assert.Equal(
Flogal,