mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 03:39:54 -08:00
rewrote enum comparisons, iterator to removeIf, added some stream and filters
This commit is contained in:
parent
05e5ca3c78
commit
3a152ab3d6
41 changed files with 178 additions and 239 deletions
|
|
@ -111,12 +111,7 @@ class TargetCardInLibrarySharingLandType extends TargetCardInLibrary {
|
|||
landTypes = new HashSet<>();
|
||||
landTypes.addAll(landCard.getSubtype(game));
|
||||
} else {
|
||||
for (Iterator<String> iterator = landTypes.iterator(); iterator.hasNext();) {
|
||||
String next = iterator.next();
|
||||
if (!landCard.getSubtype(game).contains(next)) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
landTypes.removeIf(next -> !landCard.getSubtype(game).contains(next));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue