change some size() comparisons, to isEmpty()

This commit is contained in:
Ingmar Goudt 2019-07-14 20:53:23 +02:00
parent 5ba206111a
commit eb0cfc94f8
23 changed files with 35 additions and 36 deletions

View file

@ -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())));
}