Initiative abilities - added card hint with initiative info to all related cards (closes #11424);

tests: added verify test for miss initiative card hint;
gui: fixed wrong max amount of card hint windows;
This commit is contained in:
Oleg Agafonov 2023-11-19 23:00:42 +04:00
parent 77eb3b35b8
commit 6e99a3653a
29 changed files with 92 additions and 22 deletions

View file

@ -1291,7 +1291,7 @@ public final class GamePanel extends javax.swing.JPanel {
clearClosedCardHintsWindows();
// too many dialogs can cause bad GUI performance, so limit it
if (cardHintsWindows.size() > CardHintsHelperDialog.GUI_MAX_CARD_HINTS_DIALOGS_PER_GAME) {
if (cardHintsWindows.size() >= CardHintsHelperDialog.GUI_MAX_CARD_HINTS_DIALOGS_PER_GAME) {
// show last one instead
cardHintsWindows.values().stream().reduce((a, b) -> b).ifPresent(CardHintsHelperDialog::show);
return;