From 34846170c40cb19628c03b982c479f3b2948fd0f Mon Sep 17 00:00:00 2001 From: Samuel Sandeen Date: Mon, 5 Sep 2016 11:47:52 -0400 Subject: [PATCH] Remove an unused argument to Player.putInGraveyard --- .../test/java/org/mage/test/player/TestPlayer.java | 4 ++-- .../src/test/java/org/mage/test/stub/PlayerStub.java | 2 +- Mage/src/main/java/mage/cards/CardImpl.java | 2 +- Mage/src/main/java/mage/cards/MeldCard.java | 12 ++++-------- .../main/java/mage/game/permanent/PermanentCard.java | 4 +++- .../main/java/mage/game/permanent/PermanentMeld.java | 8 ++++---- Mage/src/main/java/mage/players/Player.java | 2 +- Mage/src/main/java/mage/players/PlayerImpl.java | 4 ++-- 8 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index 62e89e3e74..5a5270969e 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -1239,8 +1239,8 @@ public class TestPlayer implements Player { } @Override - public boolean putInGraveyard(Card card, Game game, boolean fromBattlefield) { - return computerPlayer.putInGraveyard(card, game, fromBattlefield); + public boolean putInGraveyard(Card card, Game game) { + return computerPlayer.putInGraveyard(card, game); } @Override diff --git a/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java index dbc17018ca..533e31dd00 100644 --- a/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java +++ b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java @@ -594,7 +594,7 @@ public class PlayerStub implements Player { } @Override - public boolean putInGraveyard(Card card, Game game, boolean fromBattlefield) { + public boolean putInGraveyard(Card card, Game game) { return false; } diff --git a/Mage/src/main/java/mage/cards/CardImpl.java b/Mage/src/main/java/mage/cards/CardImpl.java index dd671cb3fb..9b12c761f2 100644 --- a/Mage/src/main/java/mage/cards/CardImpl.java +++ b/Mage/src/main/java/mage/cards/CardImpl.java @@ -350,7 +350,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card { updateZoneChangeCounter(game); switch (event.getToZone()) { case GRAVEYARD: - game.getPlayer(ownerId).putInGraveyard(this, game, !flag); + game.getPlayer(ownerId).putInGraveyard(this, game); break; case HAND: game.getPlayer(ownerId).getHand().add(this); diff --git a/Mage/src/main/java/mage/cards/MeldCard.java b/Mage/src/main/java/mage/cards/MeldCard.java index 0fb696ae93..952b60122b 100644 --- a/Mage/src/main/java/mage/cards/MeldCard.java +++ b/Mage/src/main/java/mage/cards/MeldCard.java @@ -32,10 +32,6 @@ import java.util.UUID; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import static mage.constants.Zone.EXILED; -import static mage.constants.Zone.GRAVEYARD; -import static mage.constants.Zone.HAND; -import static mage.constants.Zone.LIBRARY; import mage.counters.Counter; import mage.game.Game; import mage.game.events.ZoneChangeEvent; @@ -136,8 +132,8 @@ public abstract class MeldCard extends CardImpl { updateZoneChangeCounter(game); switch (event.getToZone()) { case GRAVEYARD: - game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game, true); - game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game, true); + game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game); + game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game); break; case HAND: game.getPlayer(this.getOwnerId()).getHand().add(topHalfCard); @@ -202,8 +198,8 @@ public abstract class MeldCard extends CardImpl { updateZoneChangeCounter(game); switch (event.getToZone()) { case GRAVEYARD: - game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game, true); - game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game, true); + game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game); + game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game); break; case HAND: game.getPlayer(this.getOwnerId()).getHand().add(topHalfCard); diff --git a/Mage/src/main/java/mage/game/permanent/PermanentCard.java b/Mage/src/main/java/mage/game/permanent/PermanentCard.java index bb583cd292..269cb3dab0 100644 --- a/Mage/src/main/java/mage/game/permanent/PermanentCard.java +++ b/Mage/src/main/java/mage/game/permanent/PermanentCard.java @@ -38,6 +38,8 @@ import mage.cards.Card; import mage.cards.LevelerCard; import mage.constants.Zone; import mage.game.Game; +import mage.game.ZoneInfo; +import mage.game.ZonesHandler; import mage.game.command.Commander; import mage.game.events.ZoneChangeEvent; import mage.players.Player; @@ -164,7 +166,7 @@ public class PermanentCard extends PermanentImpl { card.updateZoneChangeCounter(game); switch (event.getToZone()) { case GRAVEYARD: - owner.putInGraveyard(card, game, !flag); + owner.putInGraveyard(card, game); break; case HAND: owner.getHand().add(card); diff --git a/Mage/src/main/java/mage/game/permanent/PermanentMeld.java b/Mage/src/main/java/mage/game/permanent/PermanentMeld.java index 6bd0f13116..ed649a0d1b 100644 --- a/Mage/src/main/java/mage/game/permanent/PermanentMeld.java +++ b/Mage/src/main/java/mage/game/permanent/PermanentMeld.java @@ -69,8 +69,8 @@ public class PermanentMeld extends PermanentCard { Card bottomHalfCard = meldCard.getBottomHalfCard(); switch (event.getToZone()) { case GRAVEYARD: - game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game, true); - game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game, true); + game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game); + game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game); break; case HAND: game.getPlayer(this.getOwnerId()).getHand().add(topHalfCard); @@ -118,8 +118,8 @@ public class PermanentMeld extends PermanentCard { Card bottomHalfCard = meldCard.getBottomHalfCard(); switch (event.getToZone()) { case GRAVEYARD: - game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game, true); - game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game, true); + game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game); + game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game); break; case HAND: game.getPlayer(this.getOwnerId()).getHand().add(topHalfCard); diff --git a/Mage/src/main/java/mage/players/Player.java b/Mage/src/main/java/mage/players/Player.java index f476c8c5a3..8c7af146c4 100644 --- a/Mage/src/main/java/mage/players/Player.java +++ b/Mage/src/main/java/mage/players/Player.java @@ -354,7 +354,7 @@ public interface Player extends MageItem, Copyable { boolean removeFromBattlefield(Permanent permanent, Game game); - boolean putInGraveyard(Card card, Game game, boolean fromBattlefield); + boolean putInGraveyard(Card card, Game game); boolean removeFromGraveyard(Card card, Game game); diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index 51c0be590f..8f716fcd9d 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -853,11 +853,11 @@ public abstract class PlayerImpl implements Player, Serializable { } @Override - public boolean putInGraveyard(Card card, Game game, boolean fromBattlefield) { + public boolean putInGraveyard(Card card, Game game) { if (card.getOwnerId().equals(playerId)) { this.graveyard.add(card); } else { - return game.getPlayer(card.getOwnerId()).putInGraveyard(card, game, fromBattlefield); + return game.getPlayer(card.getOwnerId()).putInGraveyard(card, game); } return true; }