forked from External/mage
change some size() comparisons, to isEmpty()
This commit is contained in:
parent
5ba206111a
commit
eb0cfc94f8
23 changed files with 35 additions and 36 deletions
|
|
@ -140,7 +140,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
private boolean isCardsPlayable(Collection<CardView> cards, GameView gameView, Set<UUID> possibleTargets) {
|
||||
if (cards != null) {
|
||||
// can play
|
||||
if (gameView != null && gameView.getCanPlayObjects() != null && gameView.getCanPlayObjects().size() > 0) {
|
||||
if (gameView != null && gameView.getCanPlayObjects() != null && !gameView.getCanPlayObjects().isEmpty()) {
|
||||
for (CardView card : cards) {
|
||||
if (gameView.getCanPlayObjects().contains(card.getId())) {
|
||||
return true;
|
||||
|
|
@ -148,7 +148,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
}
|
||||
}
|
||||
// can select
|
||||
if (possibleTargets != null && possibleTargets.size() > 0) {
|
||||
if (possibleTargets != null && !possibleTargets.isEmpty()) {
|
||||
for (CardView card : cards) {
|
||||
if (possibleTargets.contains(card.getId())) {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue