From 853cf591aa22db0d5287e06214e4c3a327918af6 Mon Sep 17 00:00:00 2001 From: DeepCrimson <98864333+DeepCrimson@users.noreply.github.com> Date: Mon, 30 May 2022 06:54:13 -0700 Subject: [PATCH] Remove redundant variable controllerOfFirstTarget (#9039) --- .../common/TargetCardInASingleGraveyard.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Mage/src/main/java/mage/target/common/TargetCardInASingleGraveyard.java b/Mage/src/main/java/mage/target/common/TargetCardInASingleGraveyard.java index c737fff4b8f..38176140196 100644 --- a/Mage/src/main/java/mage/target/common/TargetCardInASingleGraveyard.java +++ b/Mage/src/main/java/mage/target/common/TargetCardInASingleGraveyard.java @@ -2,7 +2,6 @@ package mage.target.common; import mage.abilities.Ability; import mage.cards.Card; -import mage.constants.CommanderCardType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.game.Game; @@ -10,8 +9,9 @@ import mage.game.events.TargetEvent; import mage.players.Player; import mage.target.TargetCard; -import java.util.*; -import java.util.stream.Collectors; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; /** * @author LevelX2 @@ -48,10 +48,10 @@ public class TargetCardInASingleGraveyard extends TargetCard { /** * Set of UUIDs of all possible targets * - * @param sourceControllerId UUID of the ability's controller - * @param source Ability which requires the targets - * @param game Current game - * @return Set of the UUIDs of possible targets + * @param sourceControllerId UUID of the ability's controller + * @param source Ability which requires the targets + * @param game Current game + * @return Set of the UUIDs of possible targets */ @Override public Set possibleTargets(UUID sourceControllerId, Ability source, Game game) { @@ -68,8 +68,7 @@ public class TargetCardInASingleGraveyard extends TargetCard { continue; } - UUID ownerOfCardId = targetCard.getOwnerId(); - controllerOfFirstTarget = ownerOfCardId; + controllerOfFirstTarget = targetCard.getOwnerId(); break; // Only need the first UUID since they will all be the same } }