Merge pull request #9117 from DeepCrimson/removeUnusedParamFromContainsMethod

Refactor: Remove unused `sourceID` param from `contains` method
This commit is contained in:
Oleg Agafonov 2022-06-17 08:40:57 +04:00 committed by GitHub
commit 4e20c4c475
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 12 additions and 13 deletions

View file

@ -120,7 +120,7 @@ public class Battlefield implements Serializable {
}
public boolean contains(FilterPermanent filter, Ability source, Game game, int num) {
return contains(filter, source.getSourceId(), source.getControllerId(), source, game, num);
return contains(filter, source.getControllerId(), source, game, num);
}
/**
@ -129,14 +129,13 @@ public class Battlefield implements Serializable {
* matches the supplied filter.
*
* @param filter
* @param sourceId can be null for default SBA checks like legendary rule
* @param sourcePlayerId
* @param source
* @param game
* @param num
* @return boolean
*/
public boolean contains(FilterPermanent filter, UUID sourceId, UUID sourcePlayerId, Ability source, Game game, int num) {
public boolean contains(FilterPermanent filter, UUID sourcePlayerId, Ability source, Game game, int num) {
if (game.getRangeOfInfluence() == RangeOfInfluence.ALL) {
return field.values().stream()
.filter(permanent -> filter.match(permanent, sourcePlayerId, source, game)