add docs related to phasing methods, adjust method name

This commit is contained in:
xenohedron 2024-06-02 03:25:40 -04:00
parent 277e4f4311
commit 502ca34d14
2 changed files with 10 additions and 4 deletions

View file

@ -275,7 +275,10 @@ public class Battlefield implements Serializable {
}
}
public List<Permanent> getPhasedIn(Game game, UUID controllerId) {
/**
* Returns controlled permanents with phasing ability that are phased in, so that they can be phased out
*/
public List<Permanent> getPhasingOut(Game game, UUID controllerId) {
return field.values()
.stream()
.filter(perm -> perm.hasAbility(PhasingAbility.getInstance(), game)
@ -284,7 +287,10 @@ public class Battlefield implements Serializable {
.collect(Collectors.toList());
}
public List<Permanent> getPhasedOut(Game game, UUID controllerId) {
/**
* Returns controlled permanents that are phased out, so that they can be phased in
*/
public List<Permanent> getPhasedOut(UUID controllerId) {
return field.values()
.stream()
.filter(perm -> !perm.isPhasedIn() && perm.isControlledBy(controllerId))