refactor: improved card info

This commit is contained in:
Oleg Agafonov 2024-02-18 22:40:30 +04:00
parent b1e4ea2790
commit ad8e7daf97
47 changed files with 84 additions and 81 deletions

View file

@ -715,7 +715,7 @@ public final class SystemUtil {
Set<Card> cardsToLoad = new HashSet<>();
for (int i = 0; i < command.Amount; i++) {
CardInfo cardInfo = cards.get(RandomUtil.nextInt(cards.size()));
Card card = cardInfo != null ? cardInfo.getCard() : null;
Card card = cardInfo != null ? cardInfo.createCard() : null;
if (card != null) {
cardsToLoad.add(card);
}
@ -783,7 +783,7 @@ public final class SystemUtil {
Set<Card> cardsToLoad = new LinkedHashSet<>();
for (int i = 0; i < amount; i++) {
cardsToLoad.add(cardInfo.getCard());
cardsToLoad.add(cardInfo.createCard());
}
game.loadCards(cardsToLoad, owner.getId());