mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
change some size() comparisons, to isEmpty()
This commit is contained in:
parent
5ba206111a
commit
eb0cfc94f8
23 changed files with 35 additions and 36 deletions
|
|
@ -1960,7 +1960,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
final int DECK_SIZE = deckMinSize != 0 ? deckMinSize : 40;
|
||||
|
||||
List<Card> sortedCards = new ArrayList<>(cardPool);
|
||||
if (sortedCards.size() > 0) {
|
||||
if (!sortedCards.isEmpty()) {
|
||||
while (deck.getCards().size() < DECK_SIZE) {
|
||||
deck.getCards().add(sortedCards.get(RandomUtil.nextInt(sortedCards.size())));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue