GUI: added card hints in choose replacement effect dialog

This commit is contained in:
Oleg Agafonov 2024-07-19 00:05:57 +04:00
parent 67ff2da060
commit 7b2e9b390c
7 changed files with 50 additions and 26 deletions

View file

@ -2140,8 +2140,8 @@ public class TestPlayer implements Player {
}
@Override
public int chooseReplacementEffect(Map<String, String> rEffects, Game game) {
if (rEffects.size() <= 1) {
public int chooseReplacementEffect(Map<String, String> effectsMap, Map<String, MageObject> objectsMap, Game game) {
if (effectsMap.size() <= 1) {
return 0;
}
assertAliasSupportInChoices(false);
@ -2149,7 +2149,7 @@ public class TestPlayer implements Player {
String choice = choices.get(0);
int index = 0;
for (Map.Entry<String, String> entry : rEffects.entrySet()) {
for (Map.Entry<String, String> entry : effectsMap.entrySet()) {
if (entry.getValue().startsWith(choice)) {
choices.remove(0);
return index;
@ -2160,8 +2160,8 @@ public class TestPlayer implements Player {
assertWrongChoiceUsage(choice);
}
this.chooseStrictModeFailed("choice", game, String.join("\n", rEffects.values()));
return computerPlayer.chooseReplacementEffect(rEffects, game);
this.chooseStrictModeFailed("choice", game, String.join("\n", effectsMap.values()));
return computerPlayer.chooseReplacementEffect(effectsMap, objectsMap, game);
}
@Override