Remove an unused argument to Player.putInGraveyard

This commit is contained in:
Samuel Sandeen 2016-09-05 11:47:52 -04:00
parent db3c2e9d8c
commit 34846170c4
8 changed files with 18 additions and 20 deletions

View file

@ -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

View file

@ -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;
}

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -354,7 +354,7 @@ public interface Player extends MageItem, Copyable<Player> {
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);

View file

@ -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;
}