From 8aeca55c289fddd5ab783673af132252340d5f41 Mon Sep 17 00:00:00 2001 From: melvin Date: Fri, 17 Jun 2011 18:30:41 +0800 Subject: [PATCH] removed some empty lines --- src/magic/model/MagicPlayer.java | 50 -------------------------------- 1 file changed, 50 deletions(-) diff --git a/src/magic/model/MagicPlayer.java b/src/magic/model/MagicPlayer.java index 1027e39384..e79d6a9ae9 100644 --- a/src/magic/model/MagicPlayer.java +++ b/src/magic/model/MagicPlayer.java @@ -89,15 +89,11 @@ public class MagicPlayer implements MagicTarget { cardCounter=new MagicCardCounter(sourcePlayer.cardCounter); activationMap=new MagicActivationMap(copyMap,sourcePlayer.activationMap); builderCost=new MagicBuilderManaCost(sourcePlayer.builderCost); - - //Why is activationPriority the only member variable not copied? - //activationPriority=new MagicActivationPriority(); activationPriority=new MagicActivationPriority(sourcePlayer.activationPriority); } @Override public Object map(final MagicGame game) { - return game.getPlayer(index); } @@ -155,68 +151,55 @@ public class MagicPlayer implements MagicTarget { } public MagicPlayerDefinition getPlayerDefinition() { - return playerDefinition; } public int getIndex() { - return index; } public void setState(final MagicPlayerState state) { - stateFlags|=state.getMask(); } public void clearState(final MagicPlayerState state) { - stateFlags&=Integer.MAX_VALUE-state.getMask(); } public boolean hasState(final MagicPlayerState state) { - return state.hasState(stateFlags); } public int getStateFlags() { - return stateFlags; } public void setStateFlags(final int flags) { - stateFlags=flags; } public void setLife(final int life) { - this.life=life; } public int getLife() { - return life; } public void setPoison(final int poison) { - this.poison=poison; } public int getPoison() { - return poison; } public boolean canLose() { - return getCount(MagicStaticLocalVariable.platinumAngel)==0; } /** Life to use when determining if a player has lost. */ public int getLosingLife() { - if (life>0||canLose()) { return life; } @@ -225,7 +208,6 @@ public class MagicPlayer implements MagicTarget { /** Poison to use when determining if a player has lost. */ public int getLosingPoison() { - if (poison getManaActivations(final MagicGame game) { - final List activations=new ArrayList(); for (final MagicPermanent permanent : manaPermanents) { @@ -362,7 +328,6 @@ public class MagicPlayer implements MagicTarget { } private int getManaActivationsCount(final MagicGame game) { - int count=0; for (final MagicPermanent permanent : manaPermanents) { @@ -375,12 +340,10 @@ public class MagicPlayer implements MagicTarget { } public int getCount(final int cardDefinitionIndex) { - return cardCounter.getCount(cardDefinitionIndex); } public int getNrOfPermanentsWithType(final MagicType type) { - int count=0; for (final MagicPermanent permanent : permanents) { @@ -392,7 +355,6 @@ public class MagicPlayer implements MagicTarget { } public int getNrOfPermanentsWithSubType(final MagicSubType subType) { - int count=0; for (final MagicPermanent permanent : permanents) { @@ -446,9 +408,7 @@ public class MagicPlayer implements MagicTarget { } public boolean controlsPermanentWithType(final MagicType type) { - for (final MagicPermanent permanent : permanents) { - if (permanent.hasType(type)) { return true; } @@ -457,9 +417,7 @@ public class MagicPlayer implements MagicTarget { } public boolean controlsPermanentWithSubType(final MagicSubType subType) { - for (final MagicPermanent permanent : permanents) { - if (permanent.hasSubType(subType)) { return true; } @@ -469,49 +427,41 @@ public class MagicPlayer implements MagicTarget { @Override public String getName() { - return playerDefinition.getName(); } @Override public boolean isPermanent() { - return false; } @Override public boolean isPlayer() { - return true; } @Override public boolean isSpell() { - return false; } @Override public int getPreventDamage() { - return preventDamage; } @Override public void setPreventDamage(int amount) { - preventDamage=amount; } @Override public MagicPlayer getController() { - return this; } @Override public boolean isValidTarget(final MagicGame game,final MagicSource source) { - if (source.getController()!=this&&getCount(MagicStaticLocalVariable.spiritOfTheHearth)>0) { return false; }