refactoring and cleanup

This commit is contained in:
BetaSteward 2011-10-12 21:27:59 -04:00
parent 1de6aa4769
commit caaa81a42b
5 changed files with 12 additions and 22 deletions

View file

@ -28,27 +28,14 @@
package mage.sets.scarsofmirrodin;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.costs.mana.ManaCost;
import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.CostModificationEffectImpl;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.Permanent;
import mage.target.TargetSpell;
import mage.watchers.WatcherImpl;
import java.util.UUID;

View file

@ -28,6 +28,7 @@
package mage.abilities;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import mage.game.Game;
import mage.players.Player;
@ -48,8 +49,8 @@ public class Modes extends HashMap<UUID, Mode> {
public Modes(Modes modes) {
this.modeId = modes.modeId;
for (Mode mode: modes.values()) {
this.put(mode.getId(), mode.copy());
for (Map.Entry<UUID, Mode> entry: modes.entrySet()) {
this.put(entry.getKey(), entry.getValue().copy());
}
}

View file

@ -32,6 +32,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
@ -42,8 +43,8 @@ public class Counters extends HashMap<String, Counter> implements Serializable {
public Counters() {}
public Counters(final Counters counters) {
for (String key: counters.keySet()) {
this.put(key, counters.get(key).copy());
for (Map.Entry<String, Counter> entry: counters.entrySet()) {
this.put(entry.getKey(), entry.getValue().copy());
}
}

View file

@ -35,6 +35,7 @@ import mage.util.Copyable;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
@ -46,8 +47,8 @@ public class LookedAt extends HashMap<String, Cards> implements Serializable, Co
public LookedAt() { }
public LookedAt(final LookedAt lookedAt) {
for (String key: lookedAt.keySet()) {
this.put(key, lookedAt.get(key).copy());
for (Map.Entry<String, Cards> entry: lookedAt.entrySet()) {
this.put(entry.getKey(), entry.getValue().copy());
}
}

View file

@ -47,8 +47,8 @@ public class Revealed extends HashMap<String, Cards> implements Serializable, Co
public Revealed() { }
public Revealed(final Revealed revealed) {
for (String key: revealed.keySet()) {
this.put(key, revealed.get(key).copy());
for (Map.Entry<String, Cards> entry: revealed.entrySet()) {
this.put(entry.getKey(), entry.getValue().copy());
}
}